Files
patroni/typings/etcd/client.pyi
Alexander Kukushkin 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

30 lines
1.4 KiB
Python

import urllib3
from typing import Any, Optional, Set
from . import EtcdResult
class Client:
_MGET: str
_MPUT: str
_MPOST: str
_MDELETE: str
_comparison_conditions: Set[str]
_read_options: Set[str]
_del_conditions: Set[str]
http: urllib3.poolmanager.PoolManager
_use_proxies: bool
version_prefix: str
username: Optional[str]
password: Optional[str]
def __init__(self, host=..., port=..., srv_domain=..., version_prefix=..., read_timeout=..., allow_redirect=..., protocol=..., cert=..., ca_cert=..., username=..., password=..., allow_reconnect=..., use_proxies=..., expected_cluster_id=..., per_host_pool_size=..., lock_prefix=...): ...
@property
def protocol(self) -> str: ...
@property
def read_timeout(self) -> int: ...
@property
def allow_redirect(self) -> bool: ...
def write(self, key: str, value: str, ttl: int = ..., dir: bool = ..., append: bool = ..., **kwdargs: Any) -> EtcdResult: ...
def read(self, key: str, **kwdargs: Any) -> EtcdResult: ...
def delete(self, key: str, recursive: bool = ..., dir: bool = ..., **kwdargs: Any) -> EtcdResult: ...
def set(self, key: str, value: str, ttl: int = ...) -> EtcdResult: ...
def watch(self, key: str, index: int = ..., timeout: float = ..., recursive: bool = ...) -> EtcdResult: ...
def _handle_server_response(self, response: urllib3.response.HTTPResponse) -> Any: ...