mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
- added pyrightconfig.json with typeCheckingMode=strict - added type hints to all files except api.py - added type stubs for dns, etcd, consul, kazoo, pysyncobj and other modules - added type stubs for psycopg2 and urllib3 with some little fixes - fixes most of the issues reported by pyright - remaining issues will be addressed later, along with enabling CI linting task
25 lines
1.1 KiB
Python
25 lines
1.1 KiB
Python
from typing import Dict, Optional, Type, List
|
|
from .client import Client
|
|
__all__ = ['Client', 'EtcdError', 'EtcdException', 'EtcdEventIndexCleared', 'EtcdWatcherCleared', 'EtcdKeyNotFound', 'EtcdAlreadyExist', 'EtcdResult', 'EtcdConnectionFailed', 'EtcdWatchTimedOut']
|
|
class EtcdResult:
|
|
action: str = ...
|
|
modifiedIndex: int = ...
|
|
key: str = ...
|
|
value: str = ...
|
|
ttl: Optional[float] = ...
|
|
@property
|
|
def leaves(self) -> List['EtcdResult']: ...
|
|
class EtcdException(Exception):
|
|
def __init__(self, message=..., payload=...) -> None: ...
|
|
class EtcdConnectionFailed(EtcdException):
|
|
def __init__(self, message=..., payload=..., cause=...) -> None: ...
|
|
class EtcdKeyError(EtcdException): ...
|
|
class EtcdKeyNotFound(EtcdKeyError): ...
|
|
class EtcdAlreadyExist(EtcdKeyError): ...
|
|
class EtcdEventIndexCleared(EtcdException): ...
|
|
class EtcdWatchTimedOut(EtcdConnectionFailed): ...
|
|
class EtcdWatcherCleared(EtcdException): ...
|
|
class EtcdLeaderElectionInProgress(EtcdException): ...
|
|
class EtcdError:
|
|
error_exceptions: Dict[int, Type[EtcdException]] = ...
|