Files
Alexander KukushkinandGitHub 76b3b99de2 Enable pyright strict mode (#2652)
- 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
2023-05-09 09:38:00 +02:00

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]] = ...