mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 07:55:56 +03:00
Updated typeshed stubs to latest
This commit is contained in:
parent
106f74b020
commit
711ecb1e67
@ -1 +1,2 @@
|
||||
c45a879b1fc0345130f61479c715673bdc048c95
|
||||
c893857f4671e454d558c3fcaf1a502548669873
|
||||
|
||||
|
@ -165,7 +165,7 @@ class SupportsNoArgReadline(Protocol[_T_co]):
|
||||
def readline(self) -> _T_co: ...
|
||||
|
||||
class SupportsWrite(Protocol[_T_contra]):
|
||||
def write(self, __s: _T_contra) -> int: ...
|
||||
def write(self, __s: _T_contra) -> Any: ...
|
||||
|
||||
if sys.version_info >= (3,):
|
||||
ReadableBuffer = Union[bytes, bytearray, memoryview, array.array, mmap.mmap]
|
||||
|
@ -1,6 +1,6 @@
|
||||
from typing import List, TypeVar, Union
|
||||
|
||||
_Ch = TypeVar("_Ch", str, int)
|
||||
_CharT = TypeVar("_CharT", str, int)
|
||||
|
||||
NUL: int
|
||||
SOH: int
|
||||
@ -56,7 +56,7 @@ def isupper(c: Union[str, int]) -> bool: ...
|
||||
def isxdigit(c: Union[str, int]) -> bool: ...
|
||||
def isctrl(c: Union[str, int]) -> bool: ...
|
||||
def ismeta(c: Union[str, int]) -> bool: ...
|
||||
def ascii(c: _Ch) -> _Ch: ...
|
||||
def ctrl(c: _Ch) -> _Ch: ...
|
||||
def alt(c: _Ch) -> _Ch: ...
|
||||
def ascii(c: _CharT) -> _CharT: ...
|
||||
def ctrl(c: _CharT) -> _CharT: ...
|
||||
def alt(c: _CharT) -> _CharT: ...
|
||||
def unctrl(c: Union[str, int]) -> str: ...
|
||||
|
@ -29,7 +29,7 @@ if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_MessageType = TypeVar("_MessageType", bound=Message)
|
||||
_MessageT = TypeVar("_MessageT", bound=Message)
|
||||
_MessageData = Union[email.message.Message, bytes, str, IO[str], IO[bytes]]
|
||||
|
||||
class _HasIteritems(Protocol):
|
||||
@ -40,41 +40,41 @@ class _HasItems(Protocol):
|
||||
|
||||
linesep: bytes
|
||||
|
||||
class Mailbox(Generic[_MessageType]):
|
||||
class Mailbox(Generic[_MessageT]):
|
||||
|
||||
_path: Union[bytes, str] # undocumented
|
||||
_factory: Optional[Callable[[IO[Any]], _MessageType]] # undocumented
|
||||
def __init__(self, path: AnyPath, factory: Optional[Callable[[IO[Any]], _MessageType]] = ..., create: bool = ...) -> None: ...
|
||||
_factory: Optional[Callable[[IO[Any]], _MessageT]] # undocumented
|
||||
def __init__(self, path: AnyPath, factory: Optional[Callable[[IO[Any]], _MessageT]] = ..., create: bool = ...) -> None: ...
|
||||
def add(self, message: _MessageData) -> str: ...
|
||||
def remove(self, key: str) -> None: ...
|
||||
def __delitem__(self, key: str) -> None: ...
|
||||
def discard(self, key: str) -> None: ...
|
||||
def __setitem__(self, key: str, message: _MessageData) -> None: ...
|
||||
@overload
|
||||
def get(self, key: str, default: None = ...) -> Optional[_MessageType]: ...
|
||||
def get(self, key: str, default: None = ...) -> Optional[_MessageT]: ...
|
||||
@overload
|
||||
def get(self, key: str, default: _T) -> Union[_MessageType, _T]: ...
|
||||
def __getitem__(self, key: str) -> _MessageType: ...
|
||||
def get_message(self, key: str) -> _MessageType: ...
|
||||
def get(self, key: str, default: _T) -> Union[_MessageT, _T]: ...
|
||||
def __getitem__(self, key: str) -> _MessageT: ...
|
||||
def get_message(self, key: str) -> _MessageT: ...
|
||||
def get_string(self, key: str) -> str: ...
|
||||
def get_bytes(self, key: str) -> bytes: ...
|
||||
# As '_ProxyFile' doesn't implement the full IO spec, and BytesIO is incompatible with it, get_file return is Any here
|
||||
def get_file(self, key: str) -> Any: ...
|
||||
def iterkeys(self) -> Iterator[str]: ...
|
||||
def keys(self) -> List[str]: ...
|
||||
def itervalues(self) -> Iterator[_MessageType]: ...
|
||||
def __iter__(self) -> Iterator[_MessageType]: ...
|
||||
def values(self) -> List[_MessageType]: ...
|
||||
def iteritems(self) -> Iterator[Tuple[str, _MessageType]]: ...
|
||||
def items(self) -> List[Tuple[str, _MessageType]]: ...
|
||||
def itervalues(self) -> Iterator[_MessageT]: ...
|
||||
def __iter__(self) -> Iterator[_MessageT]: ...
|
||||
def values(self) -> List[_MessageT]: ...
|
||||
def iteritems(self) -> Iterator[Tuple[str, _MessageT]]: ...
|
||||
def items(self) -> List[Tuple[str, _MessageT]]: ...
|
||||
def __contains__(self, key: str) -> bool: ...
|
||||
def __len__(self) -> int: ...
|
||||
def clear(self) -> None: ...
|
||||
@overload
|
||||
def pop(self, key: str, default: None = ...) -> Optional[_MessageType]: ...
|
||||
def pop(self, key: str, default: None = ...) -> Optional[_MessageT]: ...
|
||||
@overload
|
||||
def pop(self, key: str, default: _T = ...) -> Union[_MessageType, _T]: ...
|
||||
def popitem(self) -> Tuple[str, _MessageType]: ...
|
||||
def pop(self, key: str, default: _T = ...) -> Union[_MessageT, _T]: ...
|
||||
def popitem(self) -> Tuple[str, _MessageT]: ...
|
||||
def update(self, arg: Optional[Union[_HasIteritems, _HasItems, Iterable[Tuple[str, _MessageData]]]] = ...) -> None: ...
|
||||
def flush(self) -> None: ...
|
||||
def lock(self) -> None: ...
|
||||
@ -97,9 +97,9 @@ class Maildir(Mailbox[MaildirMessage]):
|
||||
def clean(self) -> None: ...
|
||||
def next(self) -> Optional[str]: ...
|
||||
|
||||
class _singlefileMailbox(Mailbox[_MessageType]): ...
|
||||
class _singlefileMailbox(Mailbox[_MessageT]): ...
|
||||
|
||||
class _mboxMMDF(_singlefileMailbox[_MessageType]):
|
||||
class _mboxMMDF(_singlefileMailbox[_MessageT]):
|
||||
def get_file(self, key: str) -> _PartialFile[bytes]: ...
|
||||
|
||||
class mbox(_mboxMMDF[mboxMessage]):
|
||||
|
@ -59,8 +59,8 @@ class HelpFormatter:
|
||||
def format_description(self, description: _Text) -> _Text: ...
|
||||
def format_epilog(self, epilog: _Text) -> _Text: ...
|
||||
def format_heading(self, heading: Any) -> _Text: ...
|
||||
def format_option(self, option: OptionParser) -> _Text: ...
|
||||
def format_option_strings(self, option: OptionParser) -> Any: ...
|
||||
def format_option(self, option: Option) -> _Text: ...
|
||||
def format_option_strings(self, option: Option) -> _Text: ...
|
||||
def format_usage(self, usage: Any) -> _Text: ...
|
||||
def indent(self) -> None: ...
|
||||
def set_long_opt_delimiter(self, delim: _Text) -> None: ...
|
||||
@ -98,6 +98,11 @@ class Option:
|
||||
dest: Optional[_Text]
|
||||
nargs: int
|
||||
type: Any
|
||||
callback: Optional[Callable[..., Any]]
|
||||
callback_args: Optional[Tuple[Any, ...]]
|
||||
callback_kwargs: Optional[Dict[_Text, Any]]
|
||||
help: Optional[_Text]
|
||||
metavar: Optional[_Text]
|
||||
def __init__(self, *opts: Optional[_Text], **attrs: Any) -> None: ...
|
||||
def _check_action(self) -> None: ...
|
||||
def _check_callback(self) -> None: ...
|
||||
@ -109,8 +114,8 @@ class Option:
|
||||
def _check_type(self) -> None: ...
|
||||
def _set_attrs(self, attrs: Dict[_Text, Any]) -> None: ...
|
||||
def _set_opt_strings(self, opts: Iterable[_Text]) -> None: ...
|
||||
def check_value(self, opt: Any, value: Any) -> Any: ...
|
||||
def convert_value(self, opt: Any, value: Any) -> Any: ...
|
||||
def check_value(self, opt: _Text, value: Any) -> Any: ...
|
||||
def convert_value(self, opt: _Text, value: Any) -> Any: ...
|
||||
def get_opt_string(self) -> _Text: ...
|
||||
def process(self, opt: Any, value: Any, values: Any, parser: OptionParser) -> int: ...
|
||||
def take_action(self, action: _Text, dest: _Text, opt: Any, value: Any, values: Any, parser: OptionParser) -> int: ...
|
||||
@ -169,7 +174,7 @@ class OptionParser(OptionContainer):
|
||||
epilog: Optional[_Text]
|
||||
formatter: HelpFormatter
|
||||
largs: Optional[List[_Text]]
|
||||
option_groups: List[OptionParser]
|
||||
option_groups: List[OptionGroup]
|
||||
option_list: List[Option]
|
||||
process_default_values: Any
|
||||
prog: Optional[_Text]
|
||||
@ -203,9 +208,9 @@ class OptionParser(OptionContainer):
|
||||
def _process_long_opt(self, rargs: List[Any], values: Any) -> None: ...
|
||||
def _process_short_opts(self, rargs: List[Any], values: Any) -> None: ...
|
||||
@overload
|
||||
def add_option_group(self, __opt_group: OptionGroup) -> OptionParser: ...
|
||||
def add_option_group(self, __opt_group: OptionGroup) -> OptionGroup: ...
|
||||
@overload
|
||||
def add_option_group(self, *args: Any, **kwargs: Any) -> OptionParser: ...
|
||||
def add_option_group(self, *args: Any, **kwargs: Any) -> OptionGroup: ...
|
||||
def check_values(self, values: Values, args: List[_Text]) -> Tuple[Values, List[_Text]]: ...
|
||||
def disable_interspersed_args(self) -> None: ...
|
||||
def enable_interspersed_args(self) -> None: ...
|
||||
|
@ -82,6 +82,7 @@ EXOPL: bytes
|
||||
NOOPT: bytes
|
||||
|
||||
class Telnet:
|
||||
host: Optional[str] # undocumented
|
||||
def __init__(self, host: Optional[str] = ..., port: int = ..., timeout: int = ...) -> None: ...
|
||||
def open(self, host: str, port: int = ..., timeout: int = ...) -> None: ...
|
||||
def msg(self, msg: str, *args: Any) -> None: ...
|
||||
|
@ -5,14 +5,14 @@ ucd_3_2_0: UCD
|
||||
ucnhash_CAPI: Any
|
||||
unidata_version: str
|
||||
|
||||
_default = TypeVar("_default")
|
||||
_T = TypeVar("_T")
|
||||
|
||||
def bidirectional(__chr: Text) -> Text: ...
|
||||
def category(__chr: Text) -> Text: ...
|
||||
def combining(__chr: Text) -> int: ...
|
||||
def decimal(__chr: Text, __default: _default = ...) -> Union[int, _default]: ...
|
||||
def decimal(__chr: Text, __default: _T = ...) -> Union[int, _T]: ...
|
||||
def decomposition(__chr: Text) -> Text: ...
|
||||
def digit(__chr: Text, __default: _default = ...) -> Union[int, _default]: ...
|
||||
def digit(__chr: Text, __default: _T = ...) -> Union[int, _T]: ...
|
||||
def east_asian_width(__chr: Text) -> Text: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
@ -20,9 +20,9 @@ if sys.version_info >= (3, 8):
|
||||
|
||||
def lookup(__name: Union[Text, bytes]) -> Text: ...
|
||||
def mirrored(__chr: Text) -> int: ...
|
||||
def name(__chr: Text, __default: _default = ...) -> Union[Text, _default]: ...
|
||||
def name(__chr: Text, __default: _T = ...) -> Union[Text, _T]: ...
|
||||
def normalize(__form: Text, __unistr: Text) -> Text: ...
|
||||
def numeric(__chr: Text, __default: _default = ...) -> Union[float, _default]: ...
|
||||
def numeric(__chr: Text, __default: _T = ...) -> Union[float, _T]: ...
|
||||
|
||||
class UCD(object):
|
||||
# The methods below are constructed from the same array in C
|
||||
@ -31,12 +31,12 @@ class UCD(object):
|
||||
def bidirectional(self, __chr: Text) -> str: ...
|
||||
def category(self, __chr: Text) -> str: ...
|
||||
def combining(self, __chr: Text) -> int: ...
|
||||
def decimal(self, __chr: Text, __default: _default = ...) -> Union[int, _default]: ...
|
||||
def decimal(self, __chr: Text, __default: _T = ...) -> Union[int, _T]: ...
|
||||
def decomposition(self, __chr: Text) -> str: ...
|
||||
def digit(self, __chr: Text, __default: _default = ...) -> Union[int, _default]: ...
|
||||
def digit(self, __chr: Text, __default: _T = ...) -> Union[int, _T]: ...
|
||||
def east_asian_width(self, __chr: Text) -> str: ...
|
||||
def lookup(self, __name: Union[Text, bytes]) -> Text: ...
|
||||
def mirrored(self, __chr: Text) -> int: ...
|
||||
def name(self, __chr: Text, __default: _default = ...) -> Union[Text, _default]: ...
|
||||
def name(self, __chr: Text, __default: _T = ...) -> Union[Text, _T]: ...
|
||||
def normalize(self, __form: Text, __unistr: Text) -> Text: ...
|
||||
def numeric(self, __chr: Text, __default: _default = ...) -> Union[float, _default]: ...
|
||||
def numeric(self, __chr: Text, __default: _T = ...) -> Union[float, _T]: ...
|
||||
|
@ -138,11 +138,11 @@ class type(object):
|
||||
@overload
|
||||
def __init__(self, o: object) -> None: ...
|
||||
@overload
|
||||
def __init__(self, name: str, bases: Tuple[type, ...], dict: Dict[str, Any]) -> None: ...
|
||||
def __init__(self, name: str, bases: Tuple[type, ...], dict: Dict[str, Any], **kwds: Any) -> None: ...
|
||||
@overload
|
||||
def __new__(cls, o: object) -> type: ...
|
||||
@overload
|
||||
def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> type: ...
|
||||
def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any], **kwds: Any) -> type: ...
|
||||
def __call__(self, *args: Any, **kwds: Any) -> Any: ...
|
||||
def __subclasses__(self: _TT) -> List[_TT]: ...
|
||||
# Note: the documentation doesnt specify what the return type is, the standard
|
||||
|
@ -1,16 +1,16 @@
|
||||
from typing import Any, Callable, Hashable, List, Optional, SupportsInt, Tuple, TypeVar, Union
|
||||
|
||||
_Type = TypeVar("_Type", bound=type)
|
||||
_Reduce = Union[Tuple[Callable[..., _Type], Tuple[Any, ...]], Tuple[Callable[..., _Type], Tuple[Any, ...], Optional[Any]]]
|
||||
_TypeT = TypeVar("_TypeT", bound=type)
|
||||
_Reduce = Union[Tuple[Callable[..., _TypeT], Tuple[Any, ...]], Tuple[Callable[..., _TypeT], Tuple[Any, ...], Optional[Any]]]
|
||||
|
||||
__all__: List[str]
|
||||
|
||||
def pickle(
|
||||
ob_type: _Type,
|
||||
pickle_function: Callable[[_Type], Union[str, _Reduce[_Type]]],
|
||||
constructor_ob: Optional[Callable[[_Reduce[_Type]], _Type]] = ...,
|
||||
ob_type: _TypeT,
|
||||
pickle_function: Callable[[_TypeT], Union[str, _Reduce[_TypeT]]],
|
||||
constructor_ob: Optional[Callable[[_Reduce[_TypeT]], _TypeT]] = ...,
|
||||
) -> None: ...
|
||||
def constructor(object: Callable[[_Reduce[_Type]], _Type]) -> None: ...
|
||||
def constructor(object: Callable[[_Reduce[_TypeT]], _TypeT]) -> None: ...
|
||||
def add_extension(module: Hashable, name: Hashable, code: SupportsInt) -> None: ...
|
||||
def remove_extension(module: Hashable, name: Hashable, code: int) -> None: ...
|
||||
def clear_extension_cache() -> None: ...
|
||||
|
@ -1,8 +1,16 @@
|
||||
import sys
|
||||
from typing import Any, Dict, Generic, List, Mapping, Optional, TypeVar, Union
|
||||
from typing import Any, Dict, Generic, List, Mapping, Optional, TypeVar, Union, overload
|
||||
|
||||
_DataType = Union[str, Mapping[str, Union[str, Morsel[Any]]]]
|
||||
_T = TypeVar("_T")
|
||||
@overload
|
||||
def _quote(str: None) -> None: ...
|
||||
@overload
|
||||
def _quote(str: str) -> str: ...
|
||||
@overload
|
||||
def _unquote(str: None) -> None: ...
|
||||
@overload
|
||||
def _unquote(str: str) -> str: ...
|
||||
|
||||
class CookieError(Exception): ...
|
||||
|
||||
|
@ -65,7 +65,7 @@ if sys.version_info >= (3, 8):
|
||||
@property
|
||||
def pattern(self) -> str: ...
|
||||
@abc.abstractmethod
|
||||
def find_distributions(self, context: Context = ...) -> Iterable[Distribution]: ...
|
||||
def find_distributions(self, context: DistributionFinder.Context = ...) -> Iterable[Distribution]: ...
|
||||
class MetadataPathFinder(DistributionFinder):
|
||||
@classmethod
|
||||
def find_distributions(cls, context: DistributionFinder.Context = ...) -> Iterable[PathDistribution]: ...
|
||||
|
@ -34,12 +34,14 @@ class IOBase:
|
||||
def flush(self) -> None: ...
|
||||
def isatty(self) -> bool: ...
|
||||
def readable(self) -> bool: ...
|
||||
read: Callable[..., Any]
|
||||
def readlines(self, __hint: int = ...) -> List[bytes]: ...
|
||||
def seek(self, __offset: int, __whence: int = ...) -> int: ...
|
||||
def seekable(self) -> bool: ...
|
||||
def tell(self) -> int: ...
|
||||
def truncate(self, __size: Optional[int] = ...) -> int: ...
|
||||
def writable(self) -> bool: ...
|
||||
write: Callable[..., Any]
|
||||
def writelines(self, __lines: Iterable[ReadableBuffer]) -> None: ...
|
||||
def readline(self, __size: Optional[int] = ...) -> bytes: ...
|
||||
def __del__(self) -> None: ...
|
||||
|
@ -21,12 +21,12 @@ def repeat(object: _T, times: int) -> Iterator[_T]: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
@overload
|
||||
def accumulate(iterable: Iterable[_T], func: Callable[[_T, _T], _T] = ...) -> Iterator[_T]: ...
|
||||
def accumulate(iterable: Iterable[_T], func: None = ..., *, initial: Optional[_T] = ...) -> Iterator[_T]: ...
|
||||
@overload
|
||||
def accumulate(iterable: Iterable[_T], func: Callable[[_S, _T], _S], initial: Optional[_S]) -> Iterator[_S]: ...
|
||||
def accumulate(iterable: Iterable[_T], func: Callable[[_S, _T], _S], *, initial: Optional[_S] = ...) -> Iterator[_S]: ...
|
||||
|
||||
else:
|
||||
def accumulate(iterable: Iterable[_T], func: Callable[[_T, _T], _T] = ...) -> Iterator[_T]: ...
|
||||
def accumulate(iterable: Iterable[_T], func: Optional[Callable[[_T, _T], _T]] = ...) -> Iterator[_T]: ...
|
||||
|
||||
class chain(Iterator[_T], Generic[_T]):
|
||||
def __init__(self, *iterables: Iterable[_T]) -> None: ...
|
||||
@ -48,7 +48,7 @@ def islice(iterable: Iterable[_T], stop: Optional[int]) -> Iterator[_T]: ...
|
||||
def islice(iterable: Iterable[_T], start: Optional[int], stop: Optional[int], step: Optional[int] = ...) -> Iterator[_T]: ...
|
||||
def starmap(func: Callable[..., _S], iterable: Iterable[Iterable[Any]]) -> Iterator[_S]: ...
|
||||
def takewhile(predicate: Predicate[_T], iterable: Iterable[_T]) -> Iterator[_T]: ...
|
||||
def tee(iterable: Iterable[_T], n: int = ...) -> Tuple[Iterator[_T], ...]: ...
|
||||
def tee(__iterable: Iterable[_T], __n: int = ...) -> Tuple[Iterator[_T], ...]: ...
|
||||
def zip_longest(*p: Iterable[Any], fillvalue: Any = ...) -> Iterator[Any]: ...
|
||||
|
||||
_T1 = TypeVar("_T1")
|
||||
|
@ -4,8 +4,8 @@ from typing import Any, List, Optional, Tuple, Type, TypeVar, Union
|
||||
|
||||
families: List[None]
|
||||
|
||||
_TConnection = TypeVar("_TConnection", bound=Connection)
|
||||
_TListener = TypeVar("_TListener", bound=Listener)
|
||||
_ConnectionT = TypeVar("_ConnectionT", bound=Connection)
|
||||
_ListenerT = TypeVar("_ListenerT", bound=Listener)
|
||||
_Address = Union[str, Tuple[str, int]]
|
||||
|
||||
class Connection(object):
|
||||
@ -15,7 +15,7 @@ class Connection(object):
|
||||
recv_bytes: Any
|
||||
send: Any
|
||||
send_bytes: Any
|
||||
def __enter__(self: _TConnection) -> _TConnection: ...
|
||||
def __enter__(self: _ConnectionT) -> _ConnectionT: ...
|
||||
def __exit__(
|
||||
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]
|
||||
) -> None: ...
|
||||
@ -27,7 +27,7 @@ class Listener(object):
|
||||
_backlog_queue: Optional[Queue[Any]]
|
||||
@property
|
||||
def address(self) -> Optional[Queue[Any]]: ...
|
||||
def __enter__(self: _TListener) -> _TListener: ...
|
||||
def __enter__(self: _ListenerT) -> _ListenerT: ...
|
||||
def __exit__(
|
||||
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]
|
||||
) -> None: ...
|
||||
|
@ -6,7 +6,7 @@ from typing import Any, Hashable, Iterable, List, Optional, SupportsFloat, Type,
|
||||
|
||||
_T = TypeVar("_T")
|
||||
# Most functions in this module accept homogeneous collections of one of these types
|
||||
_Number = TypeVar("_Number", float, Decimal, Fraction)
|
||||
_NumberT = TypeVar("_NumberT", float, Decimal, Fraction)
|
||||
|
||||
# Used in mode, multimode
|
||||
_HashableT = TypeVar("_HashableT", bound=Hashable)
|
||||
@ -17,25 +17,25 @@ if sys.version_info >= (3, 8):
|
||||
def fmean(data: Iterable[SupportsFloat]) -> float: ...
|
||||
def geometric_mean(data: Iterable[SupportsFloat]) -> float: ...
|
||||
|
||||
def mean(data: Iterable[_Number]) -> _Number: ...
|
||||
def harmonic_mean(data: Iterable[_Number]) -> _Number: ...
|
||||
def median(data: Iterable[_Number]) -> _Number: ...
|
||||
def mean(data: Iterable[_NumberT]) -> _NumberT: ...
|
||||
def harmonic_mean(data: Iterable[_NumberT]) -> _NumberT: ...
|
||||
def median(data: Iterable[_NumberT]) -> _NumberT: ...
|
||||
def median_low(data: Iterable[SupportsLessThanT]) -> SupportsLessThanT: ...
|
||||
def median_high(data: Iterable[SupportsLessThanT]) -> SupportsLessThanT: ...
|
||||
def median_grouped(data: Iterable[_Number], interval: _Number = ...) -> _Number: ...
|
||||
def median_grouped(data: Iterable[_NumberT], interval: _NumberT = ...) -> _NumberT: ...
|
||||
def mode(data: Iterable[_HashableT]) -> _HashableT: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def multimode(data: Iterable[_HashableT]) -> List[_HashableT]: ...
|
||||
|
||||
def pstdev(data: Iterable[_Number], mu: Optional[_Number] = ...) -> _Number: ...
|
||||
def pvariance(data: Iterable[_Number], mu: Optional[_Number] = ...) -> _Number: ...
|
||||
def pstdev(data: Iterable[_NumberT], mu: Optional[_NumberT] = ...) -> _NumberT: ...
|
||||
def pvariance(data: Iterable[_NumberT], mu: Optional[_NumberT] = ...) -> _NumberT: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def quantiles(data: Iterable[_Number], *, n: int = ..., method: str = ...) -> List[_Number]: ...
|
||||
def quantiles(data: Iterable[_NumberT], *, n: int = ..., method: str = ...) -> List[_NumberT]: ...
|
||||
|
||||
def stdev(data: Iterable[_Number], xbar: Optional[_Number] = ...) -> _Number: ...
|
||||
def variance(data: Iterable[_Number], xbar: Optional[_Number] = ...) -> _Number: ...
|
||||
def stdev(data: Iterable[_NumberT], xbar: Optional[_NumberT] = ...) -> _NumberT: ...
|
||||
def variance(data: Iterable[_NumberT], xbar: Optional[_NumberT] = ...) -> _NumberT: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
class NormalDist:
|
||||
|
@ -54,7 +54,7 @@ if sys.version_info >= (3, 7):
|
||||
stdin: _FILE = ...,
|
||||
stdout: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -82,7 +82,7 @@ if sys.version_info >= (3, 7):
|
||||
stdin: _FILE = ...,
|
||||
stdout: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -110,7 +110,7 @@ if sys.version_info >= (3, 7):
|
||||
stdin: _FILE = ...,
|
||||
stdout: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -138,7 +138,7 @@ if sys.version_info >= (3, 7):
|
||||
stdin: _FILE = ...,
|
||||
stdout: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -167,7 +167,7 @@ if sys.version_info >= (3, 7):
|
||||
stdin: _FILE = ...,
|
||||
stdout: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -195,7 +195,7 @@ if sys.version_info >= (3, 7):
|
||||
stdin: _FILE = ...,
|
||||
stdout: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -226,7 +226,7 @@ else:
|
||||
stdin: _FILE = ...,
|
||||
stdout: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -252,7 +252,7 @@ else:
|
||||
stdin: _FILE = ...,
|
||||
stdout: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -278,7 +278,7 @@ else:
|
||||
stdin: _FILE = ...,
|
||||
stdout: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -305,7 +305,7 @@ else:
|
||||
stdin: _FILE = ...,
|
||||
stdout: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -331,7 +331,7 @@ else:
|
||||
stdin: _FILE = ...,
|
||||
stdout: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -358,7 +358,7 @@ def call(
|
||||
stdin: _FILE = ...,
|
||||
stdout: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -381,7 +381,7 @@ def check_call(
|
||||
stdin: _FILE = ...,
|
||||
stdout: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -404,7 +404,7 @@ if sys.version_info >= (3, 7):
|
||||
executable: Optional[AnyPath] = ...,
|
||||
stdin: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -429,7 +429,7 @@ if sys.version_info >= (3, 7):
|
||||
executable: Optional[AnyPath] = ...,
|
||||
stdin: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -454,7 +454,7 @@ if sys.version_info >= (3, 7):
|
||||
executable: Optional[AnyPath] = ...,
|
||||
stdin: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -479,7 +479,7 @@ if sys.version_info >= (3, 7):
|
||||
executable: Optional[AnyPath] = ...,
|
||||
stdin: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -505,7 +505,7 @@ if sys.version_info >= (3, 7):
|
||||
executable: Optional[AnyPath] = ...,
|
||||
stdin: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -530,7 +530,7 @@ if sys.version_info >= (3, 7):
|
||||
executable: Optional[AnyPath] = ...,
|
||||
stdin: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -557,7 +557,7 @@ else:
|
||||
executable: Optional[AnyPath] = ...,
|
||||
stdin: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -581,7 +581,7 @@ else:
|
||||
executable: Optional[AnyPath] = ...,
|
||||
stdin: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -605,7 +605,7 @@ else:
|
||||
executable: Optional[AnyPath] = ...,
|
||||
stdin: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -629,7 +629,7 @@ else:
|
||||
executable: Optional[AnyPath] = ...,
|
||||
stdin: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
@ -653,7 +653,7 @@ else:
|
||||
executable: Optional[AnyPath] = ...,
|
||||
stdin: _FILE = ...,
|
||||
stderr: _FILE = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
preexec_fn: Optional[Callable[[], Any]] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: Optional[AnyPath] = ...,
|
||||
|
@ -146,7 +146,8 @@ version_info: _version_info
|
||||
|
||||
def call_tracing(__func: Callable[..., _T], __args: Any) -> _T: ...
|
||||
def _clear_type_cache() -> None: ...
|
||||
def _current_frames() -> Dict[int, Any]: ...
|
||||
def _current_frames() -> Dict[int, FrameType]: ...
|
||||
def _getframe(__depth: int = ...) -> FrameType: ...
|
||||
def _debugmallocstats() -> None: ...
|
||||
def __displayhook__(value: object) -> None: ...
|
||||
def __excepthook__(type_: Type[BaseException], value: BaseException, traceback: TracebackType) -> None: ...
|
||||
@ -168,7 +169,6 @@ def getsizeof(obj: object) -> int: ...
|
||||
@overload
|
||||
def getsizeof(obj: object, default: int) -> int: ...
|
||||
def getswitchinterval() -> float: ...
|
||||
def _getframe(__depth: int = ...) -> FrameType: ...
|
||||
|
||||
_ProfileFunc = Callable[[FrameType, str, Any], Any]
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -18,14 +18,14 @@ class _FontDict(TypedDict):
|
||||
size: int
|
||||
weight: Literal["normal", "bold"]
|
||||
slant: Literal["roman", "italic"]
|
||||
underline: Literal[0, 1]
|
||||
overstrike: Literal[0, 1]
|
||||
underline: bool
|
||||
overstrike: bool
|
||||
|
||||
class _MetricsDict(TypedDict):
|
||||
ascent: int
|
||||
descent: int
|
||||
linespace: int
|
||||
fixed: Literal[0, 1]
|
||||
fixed: bool
|
||||
|
||||
class Font:
|
||||
name: str
|
||||
@ -46,7 +46,6 @@ class Font:
|
||||
underline: bool = ...,
|
||||
overstrike: bool = ...,
|
||||
) -> None: ...
|
||||
def __getitem__(self, key: str) -> Any: ...
|
||||
def __setitem__(self, key: str, value: Any) -> None: ...
|
||||
@overload
|
||||
def cget(self, option: Literal["family"]) -> str: ...
|
||||
@ -57,7 +56,10 @@ class Font:
|
||||
@overload
|
||||
def cget(self, option: Literal["slant"]) -> Literal["roman", "italic"]: ...
|
||||
@overload
|
||||
def cget(self, option: Literal["underline", "overstrike"]) -> Literal[0, 1]: ...
|
||||
def cget(self, option: Literal["underline", "overstrike"]) -> bool: ...
|
||||
@overload
|
||||
def cget(self, option: str) -> Any: ...
|
||||
__getitem__ = cget
|
||||
@overload
|
||||
def actual(self, option: Literal["family"], displayof: Optional[tkinter.Misc] = ...) -> str: ...
|
||||
@overload
|
||||
@ -67,7 +69,7 @@ class Font:
|
||||
@overload
|
||||
def actual(self, option: Literal["slant"], displayof: Optional[tkinter.Misc] = ...) -> Literal["roman", "italic"]: ...
|
||||
@overload
|
||||
def actual(self, option: Literal["underline", "overstrike"], displayof: Optional[tkinter.Misc] = ...) -> Literal[0, 1]: ...
|
||||
def actual(self, option: Literal["underline", "overstrike"], displayof: Optional[tkinter.Misc] = ...) -> bool: ...
|
||||
@overload
|
||||
def actual(self, option: None, displayof: Optional[tkinter.Misc] = ...) -> _FontDict: ...
|
||||
@overload
|
||||
@ -87,7 +89,7 @@ class Font:
|
||||
@overload
|
||||
def metrics(self, __option: Literal["ascent", "descent", "linespace"], *, displayof: Optional[tkinter.Misc] = ...) -> int: ...
|
||||
@overload
|
||||
def metrics(self, __option: Literal["fixed"], *, displayof: Optional[tkinter.Misc] = ...) -> Literal[0, 1]: ...
|
||||
def metrics(self, __option: Literal["fixed"], *, displayof: Optional[tkinter.Misc] = ...) -> bool: ...
|
||||
@overload
|
||||
def metrics(self, *, displayof: Optional[tkinter.Misc] = ...) -> _MetricsDict: ...
|
||||
def measure(self, text: str, displayof: Optional[tkinter.Misc] = ...) -> int: ...
|
||||
|
@ -33,23 +33,6 @@ class Widget(tkinter.Widget):
|
||||
def instate(self, statespec, callback: Optional[Any] = ..., *args, **kw): ...
|
||||
def state(self, statespec: Optional[Any] = ...): ...
|
||||
|
||||
_ButtonOptionName = Literal[
|
||||
"class",
|
||||
"command",
|
||||
"compound",
|
||||
"cursor",
|
||||
"default",
|
||||
"image",
|
||||
"padding",
|
||||
"state",
|
||||
"style",
|
||||
"takefocus",
|
||||
"text",
|
||||
"textvariable",
|
||||
"underline",
|
||||
"width",
|
||||
]
|
||||
|
||||
class Button(Widget):
|
||||
def __init__(
|
||||
self,
|
||||
@ -91,30 +74,10 @@ class Button(Widget):
|
||||
width: Union[int, Literal[""]] = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _ButtonOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def cget(self, key: _ButtonOptionName) -> Any: ...
|
||||
def invoke(self): ...
|
||||
|
||||
_CheckbuttonOptionName = Literal[
|
||||
"class",
|
||||
"command",
|
||||
"compound",
|
||||
"cursor",
|
||||
"image",
|
||||
"offvalue",
|
||||
"onvalue",
|
||||
"padding",
|
||||
"state",
|
||||
"style",
|
||||
"takefocus",
|
||||
"text",
|
||||
"textvariable",
|
||||
"underline",
|
||||
"variable",
|
||||
"width",
|
||||
]
|
||||
|
||||
class Checkbutton(Widget):
|
||||
def __init__(
|
||||
self,
|
||||
@ -163,31 +126,10 @@ class Checkbutton(Widget):
|
||||
width: Union[int, Literal[""]] = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _CheckbuttonOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def cget(self, key: _CheckbuttonOptionName) -> Any: ...
|
||||
def invoke(self): ...
|
||||
|
||||
_EntryOptionName = Literal[
|
||||
"background",
|
||||
"class",
|
||||
"cursor",
|
||||
"exportselection",
|
||||
"font",
|
||||
"foreground",
|
||||
"invalidcommand",
|
||||
"justify",
|
||||
"show",
|
||||
"state",
|
||||
"style",
|
||||
"takefocus",
|
||||
"textvariable",
|
||||
"validate",
|
||||
"validatecommand",
|
||||
"width",
|
||||
"xscrollcommand",
|
||||
]
|
||||
|
||||
class Entry(Widget, tkinter.Entry):
|
||||
def __init__(
|
||||
self,
|
||||
@ -236,7 +178,7 @@ class Entry(Widget, tkinter.Entry):
|
||||
xscrollcommand: tkinter._XYScrollCommand = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _EntryOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
# config must be copy/pasted, otherwise ttk.Entry().config is mypy error (don't know why)
|
||||
@overload # type: ignore
|
||||
def config(
|
||||
@ -261,35 +203,11 @@ class Entry(Widget, tkinter.Entry):
|
||||
xscrollcommand: tkinter._XYScrollCommand = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def config(self, cnf: _EntryOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def cget(self, key: _EntryOptionName) -> Any: ... # type: ignore
|
||||
def config(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def bbox(self, index): ...
|
||||
def identify(self, x, y): ...
|
||||
def validate(self): ...
|
||||
|
||||
_ComboboxOptionName = Literal[
|
||||
"background",
|
||||
"class",
|
||||
"cursor",
|
||||
"exportselection",
|
||||
"font",
|
||||
"foreground",
|
||||
"height",
|
||||
"invalidcommand",
|
||||
"justify",
|
||||
"postcommand",
|
||||
"show",
|
||||
"state",
|
||||
"style",
|
||||
"takefocus",
|
||||
"textvariable",
|
||||
"validate",
|
||||
"validatecommand",
|
||||
"values",
|
||||
"width",
|
||||
"xscrollcommand",
|
||||
]
|
||||
|
||||
class Combobox(Entry):
|
||||
def __init__(
|
||||
self,
|
||||
@ -343,7 +261,7 @@ class Combobox(Entry):
|
||||
xscrollcommand: tkinter._XYScrollCommand = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _ComboboxOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
# config must be copy/pasted, otherwise ttk.Combobox().config is mypy error (don't know why)
|
||||
@overload # type: ignore
|
||||
def config(
|
||||
@ -371,15 +289,10 @@ class Combobox(Entry):
|
||||
xscrollcommand: tkinter._XYScrollCommand = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def config(self, cnf: _ComboboxOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def cget(self, key: _ComboboxOptionName) -> Any: ... # type: ignore
|
||||
def config(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def current(self, newindex: Optional[Any] = ...): ...
|
||||
def set(self, value): ...
|
||||
|
||||
_FrameOptionName = Literal[
|
||||
"border", "borderwidth", "class", "cursor", "height", "padding", "relief", "style", "takefocus", "width"
|
||||
]
|
||||
|
||||
class Frame(Widget):
|
||||
def __init__(
|
||||
self,
|
||||
@ -413,33 +326,8 @@ class Frame(Widget):
|
||||
width: tkinter._ScreenUnits = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _FrameOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def cget(self, key: _FrameOptionName) -> Any: ...
|
||||
|
||||
_LabelOptionName = Literal[
|
||||
"anchor",
|
||||
"background",
|
||||
"border",
|
||||
"borderwidth",
|
||||
"class",
|
||||
"compound",
|
||||
"cursor",
|
||||
"font",
|
||||
"foreground",
|
||||
"image",
|
||||
"justify",
|
||||
"padding",
|
||||
"relief",
|
||||
"state",
|
||||
"style",
|
||||
"takefocus",
|
||||
"text",
|
||||
"textvariable",
|
||||
"underline",
|
||||
"width",
|
||||
"wraplength",
|
||||
]
|
||||
|
||||
class Label(Widget):
|
||||
def __init__(
|
||||
@ -496,26 +384,8 @@ class Label(Widget):
|
||||
wraplength: tkinter._ScreenUnits = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _LabelOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def cget(self, key: _LabelOptionName) -> Any: ...
|
||||
|
||||
_LabelframeOptionName = Literal[
|
||||
"border",
|
||||
"borderwidth",
|
||||
"class",
|
||||
"cursor",
|
||||
"height",
|
||||
"labelanchor",
|
||||
"labelwidget",
|
||||
"padding",
|
||||
"relief",
|
||||
"style",
|
||||
"takefocus",
|
||||
"text",
|
||||
"underline",
|
||||
"width",
|
||||
]
|
||||
|
||||
class Labelframe(Widget):
|
||||
def __init__(
|
||||
@ -558,29 +428,11 @@ class Labelframe(Widget):
|
||||
width: tkinter._ScreenUnits = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _LabelframeOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def cget(self, key: _LabelframeOptionName) -> Any: ...
|
||||
|
||||
LabelFrame = Labelframe
|
||||
|
||||
_MenubuttonOptionName = Literal[
|
||||
"class",
|
||||
"compound",
|
||||
"cursor",
|
||||
"direction",
|
||||
"image",
|
||||
"menu",
|
||||
"padding",
|
||||
"state",
|
||||
"style",
|
||||
"takefocus",
|
||||
"text",
|
||||
"textvariable",
|
||||
"underline",
|
||||
"width",
|
||||
]
|
||||
|
||||
class Menubutton(Widget):
|
||||
def __init__(
|
||||
self,
|
||||
@ -622,11 +474,8 @@ class Menubutton(Widget):
|
||||
width: Union[int, Literal[""]] = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _MenubuttonOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def cget(self, key: _MenubuttonOptionName) -> Any: ...
|
||||
|
||||
_NotebookOptionName = Literal["class", "cursor", "height", "padding", "style", "takefocus", "width"]
|
||||
|
||||
class Notebook(Widget):
|
||||
def __init__(
|
||||
@ -655,9 +504,8 @@ class Notebook(Widget):
|
||||
width: int = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _NotebookOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def cget(self, key: _NotebookOptionName) -> Any: ...
|
||||
def add(self, child, **kw): ...
|
||||
def forget(self, tab_id): ...
|
||||
def hide(self, tab_id): ...
|
||||
@ -669,8 +517,6 @@ class Notebook(Widget):
|
||||
def tabs(self): ...
|
||||
def enable_traversal(self): ...
|
||||
|
||||
_PanedwindowOptionName = Literal["class", "cursor", "height", "orient", "style", "takefocus", "width"]
|
||||
|
||||
class Panedwindow(Widget, tkinter.PanedWindow):
|
||||
def __init__(
|
||||
self,
|
||||
@ -698,7 +544,7 @@ class Panedwindow(Widget, tkinter.PanedWindow):
|
||||
width: int = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _PanedwindowOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
# config must be copy/pasted, otherwise ttk.Panedwindow().config is mypy error (don't know why)
|
||||
@overload # type: ignore
|
||||
def config(
|
||||
@ -712,8 +558,7 @@ class Panedwindow(Widget, tkinter.PanedWindow):
|
||||
width: int = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def config(self, cnf: _PanedwindowOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def cget(self, key: _PanedwindowOptionName) -> Any: ... # type: ignore
|
||||
def config(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
forget: Any
|
||||
def insert(self, pos, child, **kw): ...
|
||||
def pane(self, pane, option: Optional[Any] = ..., **kw): ...
|
||||
@ -721,10 +566,6 @@ class Panedwindow(Widget, tkinter.PanedWindow):
|
||||
|
||||
PanedWindow = Panedwindow
|
||||
|
||||
_ProgressbarOptionName = Literal[
|
||||
"class", "cursor", "length", "maximum", "mode", "orient", "phase", "style", "takefocus", "value", "variable"
|
||||
]
|
||||
|
||||
class Progressbar(Widget):
|
||||
def __init__(
|
||||
self,
|
||||
@ -760,31 +601,12 @@ class Progressbar(Widget):
|
||||
variable: tkinter.DoubleVar = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _ProgressbarOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def cget(self, key: _ProgressbarOptionName) -> Any: ...
|
||||
def start(self, interval: Optional[Any] = ...): ...
|
||||
def step(self, amount: Optional[Any] = ...): ...
|
||||
def stop(self): ...
|
||||
|
||||
_RadiobuttonOptionName = Literal[
|
||||
"class",
|
||||
"command",
|
||||
"compound",
|
||||
"cursor",
|
||||
"image",
|
||||
"padding",
|
||||
"state",
|
||||
"style",
|
||||
"takefocus",
|
||||
"text",
|
||||
"textvariable",
|
||||
"underline",
|
||||
"value",
|
||||
"variable",
|
||||
"width",
|
||||
]
|
||||
|
||||
class Radiobutton(Widget):
|
||||
def __init__(
|
||||
self,
|
||||
@ -828,15 +650,10 @@ class Radiobutton(Widget):
|
||||
width: Union[int, Literal[""]] = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _RadiobuttonOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def cget(self, key: _RadiobuttonOptionName) -> Any: ...
|
||||
def invoke(self): ...
|
||||
|
||||
_ScaleOptionName = Literal[
|
||||
"class", "command", "cursor", "from", "length", "orient", "state", "style", "takefocus", "to", "value", "variable"
|
||||
]
|
||||
|
||||
class Scale(Widget, tkinter.Scale):
|
||||
def __init__(
|
||||
self,
|
||||
@ -874,7 +691,7 @@ class Scale(Widget, tkinter.Scale):
|
||||
variable: tkinter.DoubleVar = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _ScaleOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
# config must be copy/pasted, otherwise ttk.Scale().config is mypy error (don't know why)
|
||||
@overload # type: ignore
|
||||
def config(
|
||||
@ -894,12 +711,9 @@ class Scale(Widget, tkinter.Scale):
|
||||
variable: tkinter.DoubleVar = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def config(self, cnf: _ScaleOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def cget(self, key: _ScaleOptionName) -> Any: ... # type: ignore
|
||||
def config(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def get(self, x: Optional[Any] = ..., y: Optional[Any] = ...): ...
|
||||
|
||||
_ScrollbarOptionName = Literal["class", "command", "cursor", "orient", "style", "takefocus"]
|
||||
|
||||
class Scrollbar(Widget, tkinter.Scrollbar):
|
||||
def __init__(
|
||||
self,
|
||||
@ -925,7 +739,7 @@ class Scrollbar(Widget, tkinter.Scrollbar):
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _ScrollbarOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
# config must be copy/pasted, otherwise ttk.Scrollbar().config is mypy error (don't know why)
|
||||
@overload # type: ignore
|
||||
def config(
|
||||
@ -939,10 +753,7 @@ class Scrollbar(Widget, tkinter.Scrollbar):
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def config(self, cnf: _ScrollbarOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def cget(self, key: _ScrollbarOptionName) -> Any: ... # type: ignore
|
||||
|
||||
_SeparatorOptionName = Literal["class", "cursor", "orient", "style", "takefocus"]
|
||||
def config(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
|
||||
class Separator(Widget):
|
||||
def __init__(
|
||||
@ -967,11 +778,8 @@ class Separator(Widget):
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _SeparatorOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def cget(self, key: _SeparatorOptionName) -> Any: ...
|
||||
|
||||
_SizegripOptionName = Literal["class", "cursor", "style", "takefocus"]
|
||||
|
||||
class Sizegrip(Widget):
|
||||
def __init__(
|
||||
@ -994,37 +802,10 @@ class Sizegrip(Widget):
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _SizegripOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def cget(self, key: _SizegripOptionName) -> Any: ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
_SpinboxOptionName = Literal[
|
||||
"background",
|
||||
"class",
|
||||
"command",
|
||||
"cursor",
|
||||
"exportselection",
|
||||
"font",
|
||||
"foreground",
|
||||
"format",
|
||||
"from",
|
||||
"increment",
|
||||
"invalidcommand",
|
||||
"justify",
|
||||
"show",
|
||||
"state",
|
||||
"style",
|
||||
"takefocus",
|
||||
"textvariable",
|
||||
"to",
|
||||
"validate",
|
||||
"validatecommand",
|
||||
"values",
|
||||
"width",
|
||||
"wrap",
|
||||
"xscrollcommand",
|
||||
]
|
||||
class Spinbox(Entry):
|
||||
def __init__(
|
||||
self,
|
||||
@ -1086,26 +867,10 @@ if sys.version_info >= (3, 7):
|
||||
xscrollcommand: tkinter._XYScrollCommand = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _SpinboxOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
config = configure # type: ignore
|
||||
def cget(self, key: _SpinboxOptionName) -> Any: ... # type: ignore
|
||||
def set(self, value: Any) -> None: ...
|
||||
|
||||
_TreeviewOptionName = Literal[
|
||||
"class",
|
||||
"columns",
|
||||
"cursor",
|
||||
"displaycolumns",
|
||||
"height",
|
||||
"padding",
|
||||
"selectmode",
|
||||
"show",
|
||||
"style",
|
||||
"takefocus",
|
||||
"xscrollcommand",
|
||||
"yscrollcommand",
|
||||
]
|
||||
|
||||
class Treeview(Widget, tkinter.XView, tkinter.YView):
|
||||
def __init__(
|
||||
self,
|
||||
@ -1147,9 +912,8 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
|
||||
yscrollcommand: tkinter._XYScrollCommand = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
def configure(self, cnf: _TreeviewOptionName) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def cget(self, key: _TreeviewOptionName) -> Any: ...
|
||||
def bbox(self, item, column: Optional[Any] = ...): ... # type: ignore
|
||||
def get_children(self, item: Optional[Any] = ...): ...
|
||||
def set_children(self, item, *newchildren): ...
|
||||
|
39
packages/pyright-internal/typeshed-fallback/third_party/2and3/click_spinner/__init__.pyi
vendored
Normal file
39
packages/pyright-internal/typeshed-fallback/third_party/2and3/click_spinner/__init__.pyi
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
import threading
|
||||
from types import TracebackType
|
||||
from typing import Iterator, Optional, Type
|
||||
from typing_extensions import Literal, Protocol
|
||||
|
||||
__version__: str
|
||||
|
||||
class _Stream(Protocol):
|
||||
def isatty(self) -> bool: ...
|
||||
def flush(self) -> None: ...
|
||||
def write(self, s: str) -> int: ...
|
||||
|
||||
class Spinner(object):
|
||||
spinner_cycle: Iterator[str]
|
||||
disable: bool
|
||||
beep: bool
|
||||
force: bool
|
||||
stream: _Stream
|
||||
stop_running: Optional[threading.Event]
|
||||
spin_thread: Optional[threading.Thread]
|
||||
def __init__(
|
||||
self,
|
||||
beep: bool,
|
||||
disable: bool,
|
||||
force: bool,
|
||||
stream: _Stream,
|
||||
) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def init_spin(self) -> None: ...
|
||||
def __enter__(self) -> Spinner: ...
|
||||
def __exit__(
|
||||
self,
|
||||
exc_type: Optional[Type[BaseException]],
|
||||
exc_val: Optional[BaseException],
|
||||
exc_tb: Optional[TracebackType],
|
||||
) -> Literal[False]: ...
|
||||
|
||||
def spinner(beep: bool, disable: bool, force: bool, stream: _Stream) -> Spinner: ...
|
@ -2,7 +2,7 @@ from typing import Any, Dict, Text, TypeVar, Union
|
||||
|
||||
from google.protobuf.message import Message
|
||||
|
||||
_MessageVar = TypeVar("_MessageVar", bound=Message)
|
||||
_MessageT = TypeVar("_MessageT", bound=Message)
|
||||
|
||||
class Error(Exception): ...
|
||||
class ParseError(Error): ...
|
||||
@ -22,5 +22,5 @@ def MessageToDict(
|
||||
preserving_proto_field_name: bool = ...,
|
||||
use_integers_for_enums: bool = ...,
|
||||
) -> Dict[Text, Any]: ...
|
||||
def Parse(text: Union[bytes, Text], message: _MessageVar, ignore_unknown_fields: bool = ...) -> _MessageVar: ...
|
||||
def ParseDict(js_dict: Any, message: _MessageVar, ignore_unknown_fields: bool = ...) -> _MessageVar: ...
|
||||
def Parse(text: Union[bytes, Text], message: _MessageT, ignore_unknown_fields: bool = ...) -> _MessageT: ...
|
||||
def ParseDict(js_dict: Any, message: _MessageT, ignore_unknown_fields: bool = ...) -> _MessageT: ...
|
||||
|
@ -27,6 +27,7 @@ from google.protobuf.message import (
|
||||
)
|
||||
|
||||
from typing import (
|
||||
Any,
|
||||
Iterable as typing___Iterable,
|
||||
Mapping as typing___Mapping,
|
||||
NewType as typing___NewType,
|
||||
@ -50,7 +51,11 @@ DESCRIPTOR: google___protobuf___descriptor___FileDescriptor = ...
|
||||
|
||||
NullValueValue = typing___NewType('NullValueValue', builtin___int)
|
||||
type___NullValueValue = NullValueValue
|
||||
NullValue: _NullValue
|
||||
|
||||
# We temporary set this to Any to simplify mypy-protobuf migration,
|
||||
# replace with `NullValue: _NullValue` after mypy-protobuf 1.24 is out.
|
||||
NullValue = Any
|
||||
|
||||
class _NullValue(google___protobuf___internal___enum_type_wrapper____EnumTypeWrapper[NullValueValue]):
|
||||
DESCRIPTOR: google___protobuf___descriptor___EnumDescriptor = ...
|
||||
NULL_VALUE = typing___cast(NullValueValue, 0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import IO, Any, Optional, Pattern, Text, Union
|
||||
from typing import IO, Any, Optional, Pattern, Text, Type, TypeVar, Union
|
||||
|
||||
from paramiko.message import Message
|
||||
|
||||
@ -6,6 +6,8 @@ OPENSSH_AUTH_MAGIC: bytes = ...
|
||||
|
||||
def _unpad_openssh(data: bytes) -> bytes: ...
|
||||
|
||||
_PK = TypeVar("_PK", bound=PKey)
|
||||
|
||||
class PKey:
|
||||
public_blob: Optional[PublicBlob]
|
||||
BEGIN_TAG: Pattern[str]
|
||||
@ -22,9 +24,9 @@ class PKey:
|
||||
def sign_ssh_data(self, data: bytes) -> Message: ...
|
||||
def verify_ssh_sig(self, data: bytes, msg: Message) -> bool: ...
|
||||
@classmethod
|
||||
def from_private_key_file(cls: Any, filename: str, password: Optional[str] = ...) -> PKey: ...
|
||||
def from_private_key_file(cls: Type[_PK], filename: str, password: Optional[str] = ...) -> _PK: ...
|
||||
@classmethod
|
||||
def from_private_key(cls, file_obj: IO[str], password: Optional[str] = ...) -> PKey: ...
|
||||
def from_private_key(cls: Type[_PK], file_obj: IO[str], password: Optional[str] = ...) -> _PK: ...
|
||||
def write_private_key_file(self, filename: str, password: Optional[str] = ...) -> None: ...
|
||||
def write_private_key(self, file_obj: IO[str], password: Optional[str] = ...) -> None: ...
|
||||
def load_certificate(self, value: Union[Message, str]) -> None: ...
|
||||
|
@ -69,7 +69,7 @@ class MOFile(_BaseFile):
|
||||
class _BaseEntry(object):
|
||||
msgid: Text
|
||||
msgstr: Text
|
||||
msgid_plural: List[Text]
|
||||
msgid_plural: Text
|
||||
msgstr_plural: List[Text]
|
||||
msgctxt: Text
|
||||
obsolete: bool
|
||||
|
@ -1 +0,0 @@
|
||||
__license__: str
|
@ -1,118 +0,0 @@
|
||||
from datetime import datetime
|
||||
from typing import Any, Callable, Dict, Generic, Iterable, List, Mapping, Optional, Set, Text, Type, TypeVar, Union
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_KT = TypeVar("_KT")
|
||||
_VT = TypeVar("_VT")
|
||||
_MT = TypeVar("_MT", bound=MapAttribute[Any, Any])
|
||||
|
||||
class Attribute(Generic[_T]):
|
||||
attr_name: Optional[Text]
|
||||
attr_type: Text
|
||||
null: bool
|
||||
default: Any
|
||||
is_hash_key: bool
|
||||
is_range_key: bool
|
||||
def __init__(
|
||||
self,
|
||||
hash_key: bool = ...,
|
||||
range_key: bool = ...,
|
||||
null: Optional[bool] = ...,
|
||||
default: Optional[Union[_T, Callable[..., _T]]] = ...,
|
||||
attr_name: Optional[Text] = ...,
|
||||
) -> None: ...
|
||||
def __set__(self, instance: Any, value: Optional[_T]) -> None: ...
|
||||
def serialize(self, value: Any) -> Any: ...
|
||||
def deserialize(self, value: Any) -> Any: ...
|
||||
def get_value(self, value: Any) -> Any: ...
|
||||
def between(self, lower: Any, upper: Any) -> Any: ...
|
||||
def is_in(self, *values: Any) -> Any: ...
|
||||
def exists(self) -> Any: ...
|
||||
def does_not_exist(self) -> Any: ...
|
||||
def is_type(self) -> Any: ...
|
||||
def startswith(self, prefix: str) -> Any: ...
|
||||
def contains(self, item: Any) -> Any: ...
|
||||
def append(self, other: Any) -> Any: ...
|
||||
def prepend(self, other: Any) -> Any: ...
|
||||
def set(self, value: Any) -> Any: ...
|
||||
def remove(self) -> Any: ...
|
||||
def add(self, *values: Any) -> Any: ...
|
||||
def delete(self, *values: Any) -> Any: ...
|
||||
|
||||
class SetMixin(object):
|
||||
def serialize(self, value): ...
|
||||
def deserialize(self, value): ...
|
||||
|
||||
class BinaryAttribute(Attribute[bytes]):
|
||||
def __get__(self, instance: Any, owner: Any) -> bytes: ...
|
||||
|
||||
class BinarySetAttribute(SetMixin, Attribute[Set[bytes]]):
|
||||
def __get__(self, instance: Any, owner: Any) -> Set[bytes]: ...
|
||||
|
||||
class UnicodeSetAttribute(SetMixin, Attribute[Set[Text]]):
|
||||
def element_serialize(self, value: Any) -> Any: ...
|
||||
def element_deserialize(self, value: Any) -> Any: ...
|
||||
def __get__(self, instance: Any, owner: Any) -> Set[Text]: ...
|
||||
|
||||
class UnicodeAttribute(Attribute[Text]):
|
||||
def __get__(self, instance: Any, owner: Any) -> Text: ...
|
||||
|
||||
class JSONAttribute(Attribute[Any]):
|
||||
def __get__(self, instance: Any, owner: Any) -> Any: ...
|
||||
|
||||
class LegacyBooleanAttribute(Attribute[bool]):
|
||||
def __get__(self, instance: Any, owner: Any) -> bool: ...
|
||||
|
||||
class BooleanAttribute(Attribute[bool]):
|
||||
def __get__(self, instance: Any, owner: Any) -> bool: ...
|
||||
|
||||
class NumberSetAttribute(SetMixin, Attribute[Set[float]]):
|
||||
def __get__(self, instance: Any, owner: Any) -> Set[float]: ...
|
||||
|
||||
class NumberAttribute(Attribute[float]):
|
||||
def __get__(self, instance: Any, owner: Any) -> float: ...
|
||||
|
||||
class UTCDateTimeAttribute(Attribute[datetime]):
|
||||
def __get__(self, instance: Any, owner: Any) -> datetime: ...
|
||||
|
||||
class NullAttribute(Attribute[None]):
|
||||
def __get__(self, instance: Any, owner: Any) -> None: ...
|
||||
|
||||
class MapAttributeMeta(type):
|
||||
def __init__(self, name, bases, attrs) -> None: ...
|
||||
|
||||
class MapAttribute(Attribute[Mapping[_KT, _VT]], metaclass=MapAttributeMeta):
|
||||
attribute_values: Any
|
||||
def __init__(
|
||||
self,
|
||||
hash_key: bool = ...,
|
||||
range_key: bool = ...,
|
||||
null: Optional[bool] = ...,
|
||||
default: Optional[Union[Any, Callable[..., Any]]] = ...,
|
||||
attr_name: Optional[Text] = ...,
|
||||
**attrs,
|
||||
) -> None: ...
|
||||
def __iter__(self) -> Iterable[_VT]: ...
|
||||
def __getattr__(self, attr: str) -> _VT: ...
|
||||
def __getitem__(self, item: _KT) -> _VT: ...
|
||||
def __set__(self, instance: Any, value: Union[None, MapAttribute[_KT, _VT], Mapping[_KT, _VT]]) -> None: ...
|
||||
def __get__(self: _MT, instance: Any, owner: Any) -> _MT: ...
|
||||
def is_type_safe(self, key: Any, value: Any) -> bool: ...
|
||||
def validate(self) -> bool: ...
|
||||
|
||||
class ListAttribute(Attribute[List[_T]]):
|
||||
element_type: Any
|
||||
def __init__(
|
||||
self,
|
||||
hash_key: bool = ...,
|
||||
range_key: bool = ...,
|
||||
null: Optional[bool] = ...,
|
||||
default: Optional[Union[Any, Callable[..., Any]]] = ...,
|
||||
attr_name: Optional[Text] = ...,
|
||||
of: Optional[Type[_T]] = ...,
|
||||
) -> None: ...
|
||||
def __get__(self, instance: Any, owner: Any) -> List[_T]: ...
|
||||
|
||||
DESERIALIZE_CLASS_MAP: Dict[Text, Attribute[Any]]
|
||||
SERIALIZE_CLASS_MAP: Dict[Type[Any], Attribute[Any]]
|
||||
SERIALIZE_KEY_MAP: Dict[Type[Any], Text]
|
@ -1,2 +0,0 @@
|
||||
from pynamodb.connection.base import Connection as Connection
|
||||
from pynamodb.connection.table import TableConnection as TableConnection
|
@ -1,158 +0,0 @@
|
||||
from typing import Any, Dict, Optional, Text
|
||||
|
||||
BOTOCORE_EXCEPTIONS: Any
|
||||
log: Any
|
||||
|
||||
class MetaTable:
|
||||
data: Dict[Any, Any]
|
||||
def __init__(self, data: Dict[Any, Any]) -> None: ...
|
||||
@property
|
||||
def range_keyname(self) -> Optional[Text]: ...
|
||||
@property
|
||||
def hash_keyname(self) -> Text: ...
|
||||
def get_index_hash_keyname(self, index_name: Text) -> Optional[Text]: ...
|
||||
def get_item_attribute_map(self, attributes, item_key: Any = ..., pythonic_key: bool = ...): ...
|
||||
def get_attribute_type(self, attribute_name, value: Optional[Any] = ...): ...
|
||||
def get_identifier_map(self, hash_key, range_key: Optional[Any] = ..., key: Any = ...): ...
|
||||
def get_exclusive_start_key_map(self, exclusive_start_key): ...
|
||||
|
||||
class Connection:
|
||||
host: Any
|
||||
region: Any
|
||||
session_cls: Any
|
||||
def __init__(
|
||||
self,
|
||||
region: Optional[Any] = ...,
|
||||
host: Optional[Any] = ...,
|
||||
session_cls: Optional[Any] = ...,
|
||||
request_timeout_seconds: Optional[Any] = ...,
|
||||
max_retry_attempts: Optional[Any] = ...,
|
||||
base_backoff_ms: Optional[Any] = ...,
|
||||
) -> None: ...
|
||||
def dispatch(self, operation_name, operation_kwargs): ...
|
||||
@property
|
||||
def session(self): ...
|
||||
@property
|
||||
def requests_session(self): ...
|
||||
@property
|
||||
def client(self): ...
|
||||
def get_meta_table(self, table_name: Text, refresh: bool = ...): ...
|
||||
def create_table(
|
||||
self,
|
||||
table_name: Text,
|
||||
attribute_definitions: Optional[Any] = ...,
|
||||
key_schema: Optional[Any] = ...,
|
||||
read_capacity_units: Optional[Any] = ...,
|
||||
write_capacity_units: Optional[Any] = ...,
|
||||
global_secondary_indexes: Optional[Any] = ...,
|
||||
local_secondary_indexes: Optional[Any] = ...,
|
||||
stream_specification: Optional[Any] = ...,
|
||||
): ...
|
||||
def delete_table(self, table_name: Text): ...
|
||||
def update_table(
|
||||
self,
|
||||
table_name: Text,
|
||||
read_capacity_units: Optional[Any] = ...,
|
||||
write_capacity_units: Optional[Any] = ...,
|
||||
global_secondary_index_updates: Optional[Any] = ...,
|
||||
): ...
|
||||
def list_tables(self, exclusive_start_table_name: Optional[Any] = ..., limit: Optional[Any] = ...): ...
|
||||
def describe_table(self, table_name: Text): ...
|
||||
def get_conditional_operator(self, operator): ...
|
||||
def get_item_attribute_map(self, table_name: Text, attributes, item_key: Any = ..., pythonic_key: bool = ...): ...
|
||||
def get_expected_map(self, table_name: Text, expected): ...
|
||||
def parse_attribute(self, attribute, return_type: bool = ...): ...
|
||||
def get_attribute_type(self, table_name: Text, attribute_name, value: Optional[Any] = ...): ...
|
||||
def get_identifier_map(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., key: Any = ...): ...
|
||||
def get_query_filter_map(self, table_name: Text, query_filters): ...
|
||||
def get_consumed_capacity_map(self, return_consumed_capacity): ...
|
||||
def get_return_values_map(self, return_values): ...
|
||||
def get_item_collection_map(self, return_item_collection_metrics): ...
|
||||
def get_exclusive_start_key_map(self, table_name: Text, exclusive_start_key): ...
|
||||
def delete_item(
|
||||
self,
|
||||
table_name: Text,
|
||||
hash_key,
|
||||
range_key: Optional[Any] = ...,
|
||||
expected: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Any] = ...,
|
||||
return_values: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ...,
|
||||
return_item_collection_metrics: Optional[Any] = ...,
|
||||
): ...
|
||||
def update_item(
|
||||
self,
|
||||
table_name: Text,
|
||||
hash_key,
|
||||
range_key: Optional[Any] = ...,
|
||||
attribute_updates: Optional[Any] = ...,
|
||||
expected: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Any] = ...,
|
||||
return_item_collection_metrics: Optional[Any] = ...,
|
||||
return_values: Optional[Any] = ...,
|
||||
): ...
|
||||
def put_item(
|
||||
self,
|
||||
table_name: Text,
|
||||
hash_key,
|
||||
range_key: Optional[Any] = ...,
|
||||
attributes: Optional[Any] = ...,
|
||||
expected: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Any] = ...,
|
||||
return_values: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ...,
|
||||
return_item_collection_metrics: Optional[Any] = ...,
|
||||
): ...
|
||||
def batch_write_item(
|
||||
self,
|
||||
table_name: Text,
|
||||
put_items: Optional[Any] = ...,
|
||||
delete_items: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ...,
|
||||
return_item_collection_metrics: Optional[Any] = ...,
|
||||
): ...
|
||||
def batch_get_item(
|
||||
self,
|
||||
table_name: Text,
|
||||
keys,
|
||||
consistent_read: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ...,
|
||||
attributes_to_get: Optional[Any] = ...,
|
||||
): ...
|
||||
def get_item(
|
||||
self,
|
||||
table_name: Text,
|
||||
hash_key,
|
||||
range_key: Optional[Any] = ...,
|
||||
consistent_read: bool = ...,
|
||||
attributes_to_get: Optional[Any] = ...,
|
||||
): ...
|
||||
def scan(
|
||||
self,
|
||||
table_name: Text,
|
||||
attributes_to_get: Optional[Any] = ...,
|
||||
limit: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Any] = ...,
|
||||
scan_filter: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ...,
|
||||
exclusive_start_key: Optional[Any] = ...,
|
||||
segment: Optional[Any] = ...,
|
||||
total_segments: Optional[Any] = ...,
|
||||
): ...
|
||||
def query(
|
||||
self,
|
||||
table_name: Text,
|
||||
hash_key,
|
||||
attributes_to_get: Optional[Any] = ...,
|
||||
consistent_read: bool = ...,
|
||||
exclusive_start_key: Optional[Any] = ...,
|
||||
index_name: Optional[Any] = ...,
|
||||
key_conditions: Optional[Any] = ...,
|
||||
query_filters: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Any] = ...,
|
||||
limit: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ...,
|
||||
scan_index_forward: Optional[Any] = ...,
|
||||
select: Optional[Any] = ...,
|
||||
): ...
|
@ -1,108 +0,0 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
class TableConnection:
|
||||
table_name: Any
|
||||
connection: Any
|
||||
def __init__(
|
||||
self,
|
||||
table_name,
|
||||
region: Optional[Any] = ...,
|
||||
host: Optional[Any] = ...,
|
||||
session_cls: Optional[Any] = ...,
|
||||
request_timeout_seconds: Optional[Any] = ...,
|
||||
max_retry_attempts: Optional[Any] = ...,
|
||||
base_backoff_ms: Optional[Any] = ...,
|
||||
) -> None: ...
|
||||
def delete_item(
|
||||
self,
|
||||
hash_key,
|
||||
range_key: Optional[Any] = ...,
|
||||
expected: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Any] = ...,
|
||||
return_values: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ...,
|
||||
return_item_collection_metrics: Optional[Any] = ...,
|
||||
): ...
|
||||
def update_item(
|
||||
self,
|
||||
hash_key,
|
||||
range_key: Optional[Any] = ...,
|
||||
attribute_updates: Optional[Any] = ...,
|
||||
expected: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ...,
|
||||
return_item_collection_metrics: Optional[Any] = ...,
|
||||
return_values: Optional[Any] = ...,
|
||||
): ...
|
||||
def put_item(
|
||||
self,
|
||||
hash_key,
|
||||
range_key: Optional[Any] = ...,
|
||||
attributes: Optional[Any] = ...,
|
||||
expected: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Any] = ...,
|
||||
return_values: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ...,
|
||||
return_item_collection_metrics: Optional[Any] = ...,
|
||||
): ...
|
||||
def batch_write_item(
|
||||
self,
|
||||
put_items: Optional[Any] = ...,
|
||||
delete_items: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ...,
|
||||
return_item_collection_metrics: Optional[Any] = ...,
|
||||
): ...
|
||||
def batch_get_item(
|
||||
self,
|
||||
keys,
|
||||
consistent_read: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ...,
|
||||
attributes_to_get: Optional[Any] = ...,
|
||||
): ...
|
||||
def get_item(
|
||||
self, hash_key, range_key: Optional[Any] = ..., consistent_read: bool = ..., attributes_to_get: Optional[Any] = ...
|
||||
): ...
|
||||
def scan(
|
||||
self,
|
||||
attributes_to_get: Optional[Any] = ...,
|
||||
limit: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Any] = ...,
|
||||
scan_filter: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ...,
|
||||
segment: Optional[Any] = ...,
|
||||
total_segments: Optional[Any] = ...,
|
||||
exclusive_start_key: Optional[Any] = ...,
|
||||
): ...
|
||||
def query(
|
||||
self,
|
||||
hash_key,
|
||||
attributes_to_get: Optional[Any] = ...,
|
||||
consistent_read: bool = ...,
|
||||
exclusive_start_key: Optional[Any] = ...,
|
||||
index_name: Optional[Any] = ...,
|
||||
key_conditions: Optional[Any] = ...,
|
||||
query_filters: Optional[Any] = ...,
|
||||
limit: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ...,
|
||||
scan_index_forward: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Any] = ...,
|
||||
select: Optional[Any] = ...,
|
||||
): ...
|
||||
def describe_table(self): ...
|
||||
def delete_table(self): ...
|
||||
def update_table(
|
||||
self,
|
||||
read_capacity_units: Optional[Any] = ...,
|
||||
write_capacity_units: Optional[Any] = ...,
|
||||
global_secondary_index_updates: Optional[Any] = ...,
|
||||
): ...
|
||||
def create_table(
|
||||
self,
|
||||
attribute_definitions: Optional[Any] = ...,
|
||||
key_schema: Optional[Any] = ...,
|
||||
read_capacity_units: Optional[Any] = ...,
|
||||
write_capacity_units: Optional[Any] = ...,
|
||||
global_secondary_indexes: Optional[Any] = ...,
|
||||
local_secondary_indexes: Optional[Any] = ...,
|
||||
stream_specification: Optional[Any] = ...,
|
||||
): ...
|
@ -1,3 +0,0 @@
|
||||
from typing import Text
|
||||
|
||||
def pythonic(var_name: Text) -> Text: ...
|
@ -1,166 +0,0 @@
|
||||
from typing import Any
|
||||
|
||||
BATCH_WRITE_ITEM: str
|
||||
DESCRIBE_TABLE: str
|
||||
BATCH_GET_ITEM: str
|
||||
CREATE_TABLE: str
|
||||
UPDATE_TABLE: str
|
||||
DELETE_TABLE: str
|
||||
LIST_TABLES: str
|
||||
UPDATE_ITEM: str
|
||||
DELETE_ITEM: str
|
||||
GET_ITEM: str
|
||||
PUT_ITEM: str
|
||||
QUERY: str
|
||||
SCAN: str
|
||||
GLOBAL_SECONDARY_INDEX_UPDATES: str
|
||||
RETURN_ITEM_COLL_METRICS: str
|
||||
EXCLUSIVE_START_TABLE_NAME: str
|
||||
RETURN_CONSUMED_CAPACITY: str
|
||||
COMPARISON_OPERATOR: str
|
||||
SCAN_INDEX_FORWARD: str
|
||||
ATTR_DEFINITIONS: str
|
||||
ATTR_VALUE_LIST: str
|
||||
TABLE_DESCRIPTION: str
|
||||
UNPROCESSED_KEYS: str
|
||||
UNPROCESSED_ITEMS: str
|
||||
CONSISTENT_READ: str
|
||||
DELETE_REQUEST: str
|
||||
RETURN_VALUES: str
|
||||
REQUEST_ITEMS: str
|
||||
ATTRS_TO_GET: str
|
||||
ATTR_UPDATES: str
|
||||
TABLE_STATUS: str
|
||||
SCAN_FILTER: str
|
||||
TABLE_NAME: str
|
||||
KEY_SCHEMA: str
|
||||
ATTR_NAME: str
|
||||
ATTR_TYPE: str
|
||||
ITEM_COUNT: str
|
||||
CAMEL_COUNT: str
|
||||
PUT_REQUEST: str
|
||||
INDEX_NAME: str
|
||||
ATTRIBUTES: str
|
||||
TABLE_KEY: str
|
||||
RESPONSES: str
|
||||
RANGE_KEY: str
|
||||
KEY_TYPE: str
|
||||
ACTION: str
|
||||
UPDATE: str
|
||||
EXISTS: str
|
||||
SELECT: str
|
||||
ACTIVE: str
|
||||
LIMIT: str
|
||||
ITEMS: str
|
||||
ITEM: str
|
||||
KEYS: str
|
||||
UTC: str
|
||||
KEY: str
|
||||
DEFAULT_ENCODING: str
|
||||
DEFAULT_REGION: str
|
||||
DATETIME_FORMAT: str
|
||||
SERVICE_NAME: str
|
||||
HTTP_OK: int
|
||||
HTTP_BAD_REQUEST: int
|
||||
PROVISIONED_THROUGHPUT: str
|
||||
READ_CAPACITY_UNITS: str
|
||||
WRITE_CAPACITY_UNITS: str
|
||||
STRING_SHORT: str
|
||||
STRING_SET_SHORT: str
|
||||
NUMBER_SHORT: str
|
||||
NUMBER_SET_SHORT: str
|
||||
BINARY_SHORT: str
|
||||
BINARY_SET_SHORT: str
|
||||
MAP_SHORT: str
|
||||
LIST_SHORT: str
|
||||
BOOLEAN: str
|
||||
BOOLEAN_SHORT: str
|
||||
STRING: str
|
||||
STRING_SET: str
|
||||
NUMBER: str
|
||||
NUMBER_SET: str
|
||||
BINARY: str
|
||||
BINARY_SET: str
|
||||
MAP: str
|
||||
LIST: str
|
||||
SHORT_ATTR_TYPES: Any
|
||||
ATTR_TYPE_MAP: Any
|
||||
LOCAL_SECONDARY_INDEX: str
|
||||
LOCAL_SECONDARY_INDEXES: str
|
||||
GLOBAL_SECONDARY_INDEX: str
|
||||
GLOBAL_SECONDARY_INDEXES: str
|
||||
PROJECTION: str
|
||||
PROJECTION_TYPE: str
|
||||
NON_KEY_ATTRIBUTES: str
|
||||
KEYS_ONLY: str
|
||||
ALL: str
|
||||
INCLUDE: str
|
||||
STREAM_VIEW_TYPE: str
|
||||
STREAM_SPECIFICATION: str
|
||||
STREAM_ENABLED: str
|
||||
STREAM_NEW_IMAGE: str
|
||||
STREAM_OLD_IMAGE: str
|
||||
STREAM_NEW_AND_OLD_IMAGE: str
|
||||
STREAM_KEYS_ONLY: str
|
||||
EXCLUSIVE_START_KEY: str
|
||||
LAST_EVALUATED_KEY: str
|
||||
QUERY_FILTER: str
|
||||
BEGINS_WITH: str
|
||||
BETWEEN: str
|
||||
EQ: str
|
||||
NE: str
|
||||
LE: str
|
||||
LT: str
|
||||
GE: str
|
||||
GT: str
|
||||
IN: str
|
||||
KEY_CONDITIONS: str
|
||||
COMPARISON_OPERATOR_VALUES: Any
|
||||
QUERY_OPERATOR_MAP: Any
|
||||
NOT_NULL: str
|
||||
NULL: str
|
||||
CONTAINS: str
|
||||
NOT_CONTAINS: str
|
||||
ALL_ATTRIBUTES: str
|
||||
ALL_PROJECTED_ATTRIBUTES: str
|
||||
SPECIFIC_ATTRIBUTES: str
|
||||
COUNT: str
|
||||
SELECT_VALUES: Any
|
||||
SCAN_OPERATOR_MAP: Any
|
||||
QUERY_FILTER_OPERATOR_MAP: Any
|
||||
DELETE_FILTER_OPERATOR_MAP: Any
|
||||
UPDATE_FILTER_OPERATOR_MAP: Any
|
||||
PUT_FILTER_OPERATOR_MAP: Any
|
||||
SEGMENT: str
|
||||
TOTAL_SEGMENTS: str
|
||||
SCAN_FILTER_VALUES: Any
|
||||
QUERY_FILTER_VALUES: Any
|
||||
DELETE_FILTER_VALUES: Any
|
||||
VALUE: str
|
||||
EXPECTED: str
|
||||
CONSUMED_CAPACITY: str
|
||||
CAPACITY_UNITS: str
|
||||
INDEXES: str
|
||||
TOTAL: str
|
||||
NONE: str
|
||||
RETURN_CONSUMED_CAPACITY_VALUES: Any
|
||||
SIZE: str
|
||||
RETURN_ITEM_COLL_METRICS_VALUES: Any
|
||||
ALL_OLD: str
|
||||
UPDATED_OLD: str
|
||||
ALL_NEW: str
|
||||
UPDATED_NEW: str
|
||||
RETURN_VALUES_VALUES: Any
|
||||
PUT: str
|
||||
DELETE: str
|
||||
ADD: str
|
||||
ATTR_UPDATE_ACTIONS: Any
|
||||
BATCH_GET_PAGE_LIMIT: int
|
||||
BATCH_WRITE_PAGE_LIMIT: int
|
||||
META_CLASS_NAME: str
|
||||
REGION: str
|
||||
HOST: str
|
||||
CONDITIONAL_OPERATOR: str
|
||||
AND: str
|
||||
OR: str
|
||||
CONDITIONAL_OPERATORS: Any
|
@ -1,23 +0,0 @@
|
||||
from typing import Any, Optional, Text
|
||||
|
||||
class PynamoDBException(Exception):
|
||||
msg: str
|
||||
cause: Any
|
||||
def __init__(self, msg: Optional[Text] = ..., cause: Optional[Exception] = ...) -> None: ...
|
||||
|
||||
class PynamoDBConnectionError(PynamoDBException): ...
|
||||
class DeleteError(PynamoDBConnectionError): ...
|
||||
class QueryError(PynamoDBConnectionError): ...
|
||||
class ScanError(PynamoDBConnectionError): ...
|
||||
class PutError(PynamoDBConnectionError): ...
|
||||
class UpdateError(PynamoDBConnectionError): ...
|
||||
class GetError(PynamoDBConnectionError): ...
|
||||
class TableError(PynamoDBConnectionError): ...
|
||||
class DoesNotExist(PynamoDBException): ...
|
||||
|
||||
class TableDoesNotExist(PynamoDBException):
|
||||
def __init__(self, table_name) -> None: ...
|
||||
|
||||
class VerboseClientError(Exception):
|
||||
MSG_TEMPLATE: Any
|
||||
def __init__(self, error_response, operation_name, verbose_properties: Optional[Any] = ...) -> None: ...
|
@ -1,39 +0,0 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
class IndexMeta(type):
|
||||
def __init__(self, name, bases, attrs) -> None: ...
|
||||
|
||||
class Index(metaclass=IndexMeta):
|
||||
Meta: Any
|
||||
def __init__(self) -> None: ...
|
||||
@classmethod
|
||||
def count(cls, hash_key, consistent_read: bool = ..., **filters) -> int: ...
|
||||
@classmethod
|
||||
def query(
|
||||
cls,
|
||||
hash_key,
|
||||
scan_index_forward: Optional[Any] = ...,
|
||||
consistent_read: bool = ...,
|
||||
limit: Optional[Any] = ...,
|
||||
last_evaluated_key: Optional[Any] = ...,
|
||||
attributes_to_get: Optional[Any] = ...,
|
||||
**filters,
|
||||
): ...
|
||||
|
||||
class GlobalSecondaryIndex(Index): ...
|
||||
class LocalSecondaryIndex(Index): ...
|
||||
|
||||
class Projection(object):
|
||||
projection_type: Any
|
||||
non_key_attributes: Any
|
||||
|
||||
class KeysOnlyProjection(Projection):
|
||||
projection_type: Any
|
||||
|
||||
class IncludeProjection(Projection):
|
||||
projection_type: Any
|
||||
non_key_attributes: Any
|
||||
def __init__(self, non_attr_keys: Optional[Any] = ...) -> None: ...
|
||||
|
||||
class AllProjection(Projection):
|
||||
projection_type: Any
|
@ -1,159 +0,0 @@
|
||||
from typing import Any, Dict, Generic, Iterable, Iterator, List, Optional, Sequence, Text, Tuple, Type, TypeVar, Union
|
||||
|
||||
from .attributes import Attribute
|
||||
from .exceptions import DoesNotExist as DoesNotExist
|
||||
|
||||
log: Any
|
||||
|
||||
class DefaultMeta: ...
|
||||
|
||||
class ResultSet(object):
|
||||
results: Any
|
||||
operation: Any
|
||||
arguments: Any
|
||||
def __init__(self, results, operation, arguments) -> None: ...
|
||||
def __iter__(self): ...
|
||||
|
||||
class MetaModel(type):
|
||||
def __init__(self, name: Text, bases: Tuple[type, ...], attrs: Dict[Any, Any]) -> None: ...
|
||||
|
||||
_T = TypeVar("_T", bound="Model")
|
||||
KeyType = Union[Text, bytes, float, int, Tuple[Any, ...]]
|
||||
|
||||
class Model(metaclass=MetaModel):
|
||||
DoesNotExist = DoesNotExist
|
||||
attribute_values: Dict[Text, Any]
|
||||
def __init__(self, hash_key: Optional[KeyType] = ..., range_key: Optional[Any] = ..., **attrs) -> None: ...
|
||||
@classmethod
|
||||
def has_map_or_list_attributes(cls: Type[_T]) -> bool: ...
|
||||
@classmethod
|
||||
def batch_get(
|
||||
cls: Type[_T],
|
||||
items: Iterable[Union[KeyType, Iterable[KeyType]]],
|
||||
consistent_read: Optional[bool] = ...,
|
||||
attributes_to_get: Optional[Sequence[Text]] = ...,
|
||||
) -> Iterator[_T]: ...
|
||||
@classmethod
|
||||
def batch_write(cls: Type[_T], auto_commit: bool = ...) -> BatchWrite[_T]: ...
|
||||
def delete(self, condition: Optional[Any] = ..., conditional_operator: Optional[Text] = ..., **expected_values) -> Any: ...
|
||||
def update(
|
||||
self,
|
||||
attributes: Optional[Dict[Text, Dict[Text, Any]]] = ...,
|
||||
actions: Optional[List[Any]] = ...,
|
||||
condition: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Text] = ...,
|
||||
**expected_values,
|
||||
) -> Any: ...
|
||||
def update_item(
|
||||
self,
|
||||
attribute: Text,
|
||||
value: Optional[Any] = ...,
|
||||
action: Optional[Text] = ...,
|
||||
conditional_operator: Optional[Text] = ...,
|
||||
**expected_values,
|
||||
): ...
|
||||
def save(
|
||||
self, condition: Optional[Any] = ..., conditional_operator: Optional[Text] = ..., **expected_values
|
||||
) -> Dict[str, Any]: ...
|
||||
def refresh(self, consistent_read: bool = ...): ...
|
||||
@classmethod
|
||||
def get(cls: Type[_T], hash_key: KeyType, range_key: Optional[KeyType] = ..., consistent_read: bool = ...) -> _T: ...
|
||||
@classmethod
|
||||
def from_raw_data(cls: Type[_T], data) -> _T: ...
|
||||
@classmethod
|
||||
def count(
|
||||
cls: Type[_T],
|
||||
hash_key: Optional[KeyType] = ...,
|
||||
consistent_read: bool = ...,
|
||||
index_name: Optional[Text] = ...,
|
||||
limit: Optional[int] = ...,
|
||||
**filters,
|
||||
) -> int: ...
|
||||
@classmethod
|
||||
def query(
|
||||
cls: Type[_T],
|
||||
hash_key: KeyType,
|
||||
consistent_read: bool = ...,
|
||||
index_name: Optional[Text] = ...,
|
||||
scan_index_forward: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Text] = ...,
|
||||
limit: Optional[int] = ...,
|
||||
last_evaluated_key: Optional[Any] = ...,
|
||||
attributes_to_get: Optional[Iterable[Text]] = ...,
|
||||
page_size: Optional[int] = ...,
|
||||
**filters,
|
||||
) -> Iterator[_T]: ...
|
||||
@classmethod
|
||||
def rate_limited_scan(
|
||||
cls: Type[_T],
|
||||
# TODO: annotate Condition class
|
||||
filter_condition: Optional[Any] = ...,
|
||||
attributes_to_get: Optional[Sequence[Text]] = ...,
|
||||
segment: Optional[int] = ...,
|
||||
total_segments: Optional[int] = ...,
|
||||
limit: Optional[int] = ...,
|
||||
conditional_operator: Optional[Text] = ...,
|
||||
last_evaluated_key: Optional[Any] = ...,
|
||||
page_size: Optional[int] = ...,
|
||||
timeout_seconds: Optional[int] = ...,
|
||||
read_capacity_to_consume_per_second: int = ...,
|
||||
allow_rate_limited_scan_without_consumed_capacity: Optional[bool] = ...,
|
||||
max_sleep_between_retry: int = ...,
|
||||
max_consecutive_exceptions: int = ...,
|
||||
consistent_read: Optional[bool] = ...,
|
||||
index_name: Optional[str] = ...,
|
||||
**filters: Any,
|
||||
) -> Iterator[_T]: ...
|
||||
@classmethod
|
||||
def scan(
|
||||
cls: Type[_T],
|
||||
segment: Optional[int] = ...,
|
||||
total_segments: Optional[int] = ...,
|
||||
limit: Optional[int] = ...,
|
||||
conditional_operator: Optional[Text] = ...,
|
||||
last_evaluated_key: Optional[Any] = ...,
|
||||
page_size: Optional[int] = ...,
|
||||
**filters,
|
||||
) -> Iterator[_T]: ...
|
||||
@classmethod
|
||||
def exists(cls: Type[_T]) -> bool: ...
|
||||
@classmethod
|
||||
def delete_table(cls): ...
|
||||
@classmethod
|
||||
def describe_table(cls): ...
|
||||
@classmethod
|
||||
def create_table(
|
||||
cls: Type[_T], wait: bool = ..., read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ...
|
||||
): ...
|
||||
@classmethod
|
||||
def dumps(cls): ...
|
||||
@classmethod
|
||||
def dump(cls, filename): ...
|
||||
@classmethod
|
||||
def loads(cls, data): ...
|
||||
@classmethod
|
||||
def load(cls, filename): ...
|
||||
@classmethod
|
||||
def add_throttle_record(cls, records): ...
|
||||
@classmethod
|
||||
def get_throttle(cls): ...
|
||||
@classmethod
|
||||
def get_attributes(cls) -> Dict[str, Attribute[Any]]: ...
|
||||
@classmethod
|
||||
def _get_attributes(cls) -> Dict[str, Attribute[Any]]: ...
|
||||
|
||||
class ModelContextManager(Generic[_T]):
|
||||
model: Type[_T]
|
||||
auto_commit: bool
|
||||
max_operations: int
|
||||
pending_operations: List[Dict[Text, Any]]
|
||||
def __init__(self, model: Type[_T], auto_commit: bool = ...) -> None: ...
|
||||
def __enter__(self) -> ModelContextManager[_T]: ...
|
||||
|
||||
class BatchWrite(ModelContextManager[_T]):
|
||||
def save(self, put_item: _T) -> None: ...
|
||||
def delete(self, del_item: _T) -> None: ...
|
||||
def __enter__(self) -> BatchWrite[_T]: ...
|
||||
def __exit__(self, exc_type, exc_val, exc_tb) -> None: ...
|
||||
pending_operations: Any
|
||||
def commit(self) -> None: ...
|
@ -1,8 +0,0 @@
|
||||
from typing import Any
|
||||
|
||||
log: Any
|
||||
default_settings_dict: Any
|
||||
OVERRIDE_SETTINGS_PATH: Any
|
||||
override_settings: Any
|
||||
|
||||
def get_settings_value(key): ...
|
@ -1,19 +0,0 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
log: Any
|
||||
|
||||
class ThrottleBase:
|
||||
capacity: Any
|
||||
window: Any
|
||||
records: Any
|
||||
sleep_interval: Any
|
||||
def __init__(self, capacity, window: int = ..., initial_sleep: Optional[Any] = ...) -> None: ...
|
||||
def add_record(self, record): ...
|
||||
def throttle(self): ...
|
||||
|
||||
class NoThrottle(ThrottleBase):
|
||||
def __init__(self) -> None: ...
|
||||
def add_record(self, record): ...
|
||||
|
||||
class Throttle(ThrottleBase):
|
||||
def throttle(self): ...
|
@ -1,5 +0,0 @@
|
||||
STRING: str
|
||||
NUMBER: str
|
||||
BINARY: str
|
||||
HASH: str
|
||||
RANGE: str
|
Loading…
Reference in New Issue
Block a user