mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 07:55:56 +03:00
Updated typeshed stubs to the latest version.
This commit is contained in:
parent
5e96c7bb73
commit
90e70c3786
@ -1 +1 @@
|
||||
880c0da4045cd5ff2c29b73429629adf27e49d50
|
||||
9c4bfd5d11b47677e128452baa8ac7eeb1903a8e
|
||||
|
@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import SupportsRichComparisonT
|
||||
from collections.abc import Callable, MutableSequence, Sequence
|
||||
from _typeshed import SupportsLenAndGetItem, SupportsRichComparisonT
|
||||
from collections.abc import Callable, MutableSequence
|
||||
from typing import TypeVar, overload
|
||||
|
||||
_T = TypeVar("_T")
|
||||
@ -8,11 +8,16 @@ _T = TypeVar("_T")
|
||||
if sys.version_info >= (3, 10):
|
||||
@overload
|
||||
def bisect_left(
|
||||
a: Sequence[SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, hi: int | None = None, *, key: None = None
|
||||
a: SupportsLenAndGetItem[SupportsRichComparisonT],
|
||||
x: SupportsRichComparisonT,
|
||||
lo: int = 0,
|
||||
hi: int | None = None,
|
||||
*,
|
||||
key: None = None,
|
||||
) -> int: ...
|
||||
@overload
|
||||
def bisect_left(
|
||||
a: Sequence[_T],
|
||||
a: SupportsLenAndGetItem[_T],
|
||||
x: SupportsRichComparisonT,
|
||||
lo: int = 0,
|
||||
hi: int | None = None,
|
||||
@ -21,11 +26,16 @@ if sys.version_info >= (3, 10):
|
||||
) -> int: ...
|
||||
@overload
|
||||
def bisect_right(
|
||||
a: Sequence[SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, hi: int | None = None, *, key: None = None
|
||||
a: SupportsLenAndGetItem[SupportsRichComparisonT],
|
||||
x: SupportsRichComparisonT,
|
||||
lo: int = 0,
|
||||
hi: int | None = None,
|
||||
*,
|
||||
key: None = None,
|
||||
) -> int: ...
|
||||
@overload
|
||||
def bisect_right(
|
||||
a: Sequence[_T],
|
||||
a: SupportsLenAndGetItem[_T],
|
||||
x: SupportsRichComparisonT,
|
||||
lo: int = 0,
|
||||
hi: int | None = None,
|
||||
@ -61,10 +71,10 @@ if sys.version_info >= (3, 10):
|
||||
|
||||
else:
|
||||
def bisect_left(
|
||||
a: Sequence[SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, hi: int | None = None
|
||||
a: SupportsLenAndGetItem[SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, hi: int | None = None
|
||||
) -> int: ...
|
||||
def bisect_right(
|
||||
a: Sequence[SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, hi: int | None = None
|
||||
a: SupportsLenAndGetItem[SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, hi: int | None = None
|
||||
) -> int: ...
|
||||
def insort_left(
|
||||
a: MutableSequence[SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, hi: int | None = None
|
||||
|
@ -43,42 +43,42 @@ class _writer:
|
||||
|
||||
def writer(
|
||||
csvfile: SupportsWrite[str],
|
||||
dialect: _DialectLike = ...,
|
||||
dialect: _DialectLike = "excel",
|
||||
*,
|
||||
delimiter: str = ...,
|
||||
quotechar: str | None = ...,
|
||||
escapechar: str | None = ...,
|
||||
doublequote: bool = ...,
|
||||
skipinitialspace: bool = ...,
|
||||
lineterminator: str = ...,
|
||||
quoting: _QuotingType = ...,
|
||||
strict: bool = ...,
|
||||
delimiter: str = ",",
|
||||
quotechar: str | None = '"',
|
||||
escapechar: str | None = None,
|
||||
doublequote: bool = True,
|
||||
skipinitialspace: bool = False,
|
||||
lineterminator: str = "\r\n",
|
||||
quoting: _QuotingType = 0,
|
||||
strict: bool = False,
|
||||
) -> _writer: ...
|
||||
def reader(
|
||||
csvfile: Iterable[str],
|
||||
dialect: _DialectLike = ...,
|
||||
dialect: _DialectLike = "excel",
|
||||
*,
|
||||
delimiter: str = ...,
|
||||
quotechar: str | None = ...,
|
||||
escapechar: str | None = ...,
|
||||
doublequote: bool = ...,
|
||||
skipinitialspace: bool = ...,
|
||||
lineterminator: str = ...,
|
||||
quoting: _QuotingType = ...,
|
||||
strict: bool = ...,
|
||||
delimiter: str = ",",
|
||||
quotechar: str | None = '"',
|
||||
escapechar: str | None = None,
|
||||
doublequote: bool = True,
|
||||
skipinitialspace: bool = False,
|
||||
lineterminator: str = "\r\n",
|
||||
quoting: _QuotingType = 0,
|
||||
strict: bool = False,
|
||||
) -> _reader: ...
|
||||
def register_dialect(
|
||||
name: str,
|
||||
dialect: Any = ...,
|
||||
dialect: type[Dialect] = ...,
|
||||
*,
|
||||
delimiter: str = ...,
|
||||
quotechar: str | None = ...,
|
||||
escapechar: str | None = ...,
|
||||
doublequote: bool = ...,
|
||||
skipinitialspace: bool = ...,
|
||||
lineterminator: str = ...,
|
||||
quoting: _QuotingType = ...,
|
||||
strict: bool = ...,
|
||||
delimiter: str = ",",
|
||||
quotechar: str | None = '"',
|
||||
escapechar: str | None = None,
|
||||
doublequote: bool = True,
|
||||
skipinitialspace: bool = False,
|
||||
lineterminator: str = "\r\n",
|
||||
quoting: _QuotingType = 0,
|
||||
strict: bool = False,
|
||||
) -> None: ...
|
||||
def unregister_dialect(name: str) -> None: ...
|
||||
def get_dialect(name: str) -> Dialect: ...
|
||||
|
@ -293,7 +293,7 @@ class structseq(Generic[_T_co]):
|
||||
# https://github.com/python/typeshed/pull/6560#discussion_r767149830
|
||||
def __new__(cls: type[Self], sequence: Iterable[_T_co], dict: dict[str, Any] = ...) -> Self: ...
|
||||
|
||||
# Superset of typing.AnyStr that also inclues LiteralString
|
||||
# Superset of typing.AnyStr that also includes LiteralString
|
||||
AnyOrLiteralStr = TypeVar("AnyOrLiteralStr", str, bytes, LiteralString) # noqa: Y001
|
||||
|
||||
# Represents when str or LiteralStr is acceptable. Useful for string processing
|
||||
|
@ -161,17 +161,12 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
|
||||
add_help: bool = True,
|
||||
allow_abbrev: bool = True,
|
||||
) -> None: ...
|
||||
# The type-ignores in these overloads should be temporary. See:
|
||||
# https://github.com/python/typeshed/pull/2643#issuecomment-442280277
|
||||
# Ignore errors about overlapping overloads
|
||||
@overload
|
||||
def parse_args(self, args: Sequence[str] | None = None) -> Namespace: ...
|
||||
@overload
|
||||
def parse_args(self, args: Sequence[str] | None, namespace: None) -> Namespace: ... # type: ignore[misc]
|
||||
def parse_args(self, args: Sequence[str] | None = None, namespace: None = None) -> Namespace: ... # type: ignore[misc]
|
||||
@overload
|
||||
def parse_args(self, args: Sequence[str] | None, namespace: _N) -> _N: ...
|
||||
@overload
|
||||
def parse_args(self, *, namespace: None) -> Namespace: ... # type: ignore[misc]
|
||||
@overload
|
||||
def parse_args(self, *, namespace: _N) -> _N: ...
|
||||
@overload
|
||||
def add_subparsers(
|
||||
|
@ -46,7 +46,7 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
|
||||
def get_pid(self) -> int | None: ... # type: ignore[override]
|
||||
def get_pipe_transport(self, fd: int) -> _File: ... # type: ignore[override]
|
||||
def _check_proc(self) -> None: ... # undocumented
|
||||
def send_signal(self, signal: int) -> None: ... # type: ignore[override]
|
||||
def send_signal(self, signal: int) -> None: ...
|
||||
async def _connect_pipes(self, waiter: futures.Future[Any] | None) -> None: ... # undocumented
|
||||
def _call(self, cb: Callable[..., object], *data: Any) -> None: ... # undocumented
|
||||
def _pipe_connection_lost(self, fd: int, exc: BaseException | None) -> None: ... # undocumented
|
||||
|
@ -54,24 +54,24 @@ if sys.version_info >= (3, 11):
|
||||
bufsize: Literal[0] = 0,
|
||||
encoding: None = None,
|
||||
errors: None = None,
|
||||
text: Literal[False, None] = ...,
|
||||
text: Literal[False, None] = None,
|
||||
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
|
||||
executable: StrOrBytesPath | None = ...,
|
||||
preexec_fn: Callable[[], Any] | None = ...,
|
||||
close_fds: bool = ...,
|
||||
cwd: StrOrBytesPath | None = ...,
|
||||
env: subprocess._ENV | None = ...,
|
||||
startupinfo: Any | None = ...,
|
||||
creationflags: int = ...,
|
||||
restore_signals: bool = ...,
|
||||
start_new_session: bool = ...,
|
||||
executable: StrOrBytesPath | None = None,
|
||||
preexec_fn: Callable[[], Any] | None = None,
|
||||
close_fds: bool = True,
|
||||
cwd: StrOrBytesPath | None = None,
|
||||
env: subprocess._ENV | None = None,
|
||||
startupinfo: Any | None = None,
|
||||
creationflags: int = 0,
|
||||
restore_signals: bool = True,
|
||||
start_new_session: bool = False,
|
||||
pass_fds: Collection[int] = ...,
|
||||
group: None | str | int = ...,
|
||||
extra_groups: None | Collection[str | int] = ...,
|
||||
user: None | str | int = ...,
|
||||
umask: int = ...,
|
||||
process_group: int | None = ...,
|
||||
pipesize: int = ...,
|
||||
group: None | str | int = None,
|
||||
extra_groups: None | Collection[str | int] = None,
|
||||
user: None | str | int = None,
|
||||
umask: int = -1,
|
||||
process_group: int | None = None,
|
||||
pipesize: int = -1,
|
||||
) -> Process: ...
|
||||
async def create_subprocess_exec(
|
||||
program: _ExecArg,
|
||||
@ -87,23 +87,23 @@ if sys.version_info >= (3, 11):
|
||||
encoding: None = None,
|
||||
errors: None = None,
|
||||
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
|
||||
text: bool | None = ...,
|
||||
executable: StrOrBytesPath | None = ...,
|
||||
preexec_fn: Callable[[], Any] | None = ...,
|
||||
close_fds: bool = ...,
|
||||
cwd: StrOrBytesPath | None = ...,
|
||||
env: subprocess._ENV | None = ...,
|
||||
startupinfo: Any | None = ...,
|
||||
creationflags: int = ...,
|
||||
restore_signals: bool = ...,
|
||||
start_new_session: bool = ...,
|
||||
text: bool | None = None,
|
||||
executable: StrOrBytesPath | None = None,
|
||||
preexec_fn: Callable[[], Any] | None = None,
|
||||
close_fds: bool = True,
|
||||
cwd: StrOrBytesPath | None = None,
|
||||
env: subprocess._ENV | None = None,
|
||||
startupinfo: Any | None = None,
|
||||
creationflags: int = 0,
|
||||
restore_signals: bool = True,
|
||||
start_new_session: bool = False,
|
||||
pass_fds: Collection[int] = ...,
|
||||
group: None | str | int = ...,
|
||||
extra_groups: None | Collection[str | int] = ...,
|
||||
user: None | str | int = ...,
|
||||
umask: int = ...,
|
||||
process_group: int | None = ...,
|
||||
pipesize: int = ...,
|
||||
group: None | str | int = None,
|
||||
extra_groups: None | Collection[str | int] = None,
|
||||
user: None | str | int = None,
|
||||
umask: int = -1,
|
||||
process_group: int | None = None,
|
||||
pipesize: int = -1,
|
||||
) -> Process: ...
|
||||
|
||||
elif sys.version_info >= (3, 10):
|
||||
@ -120,23 +120,23 @@ elif sys.version_info >= (3, 10):
|
||||
bufsize: Literal[0] = 0,
|
||||
encoding: None = None,
|
||||
errors: None = None,
|
||||
text: Literal[False, None] = ...,
|
||||
text: Literal[False, None] = None,
|
||||
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
|
||||
executable: StrOrBytesPath | None = ...,
|
||||
preexec_fn: Callable[[], Any] | None = ...,
|
||||
close_fds: bool = ...,
|
||||
cwd: StrOrBytesPath | None = ...,
|
||||
env: subprocess._ENV | None = ...,
|
||||
startupinfo: Any | None = ...,
|
||||
creationflags: int = ...,
|
||||
restore_signals: bool = ...,
|
||||
start_new_session: bool = ...,
|
||||
executable: StrOrBytesPath | None = None,
|
||||
preexec_fn: Callable[[], Any] | None = None,
|
||||
close_fds: bool = True,
|
||||
cwd: StrOrBytesPath | None = None,
|
||||
env: subprocess._ENV | None = None,
|
||||
startupinfo: Any | None = None,
|
||||
creationflags: int = 0,
|
||||
restore_signals: bool = True,
|
||||
start_new_session: bool = False,
|
||||
pass_fds: Collection[int] = ...,
|
||||
group: None | str | int = ...,
|
||||
extra_groups: None | Collection[str | int] = ...,
|
||||
user: None | str | int = ...,
|
||||
umask: int = ...,
|
||||
pipesize: int = ...,
|
||||
group: None | str | int = None,
|
||||
extra_groups: None | Collection[str | int] = None,
|
||||
user: None | str | int = None,
|
||||
umask: int = -1,
|
||||
pipesize: int = -1,
|
||||
) -> Process: ...
|
||||
async def create_subprocess_exec(
|
||||
program: _ExecArg,
|
||||
@ -152,22 +152,22 @@ elif sys.version_info >= (3, 10):
|
||||
encoding: None = None,
|
||||
errors: None = None,
|
||||
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
|
||||
text: bool | None = ...,
|
||||
executable: StrOrBytesPath | None = ...,
|
||||
preexec_fn: Callable[[], Any] | None = ...,
|
||||
close_fds: bool = ...,
|
||||
cwd: StrOrBytesPath | None = ...,
|
||||
env: subprocess._ENV | None = ...,
|
||||
startupinfo: Any | None = ...,
|
||||
creationflags: int = ...,
|
||||
restore_signals: bool = ...,
|
||||
start_new_session: bool = ...,
|
||||
text: bool | None = None,
|
||||
executable: StrOrBytesPath | None = None,
|
||||
preexec_fn: Callable[[], Any] | None = None,
|
||||
close_fds: bool = True,
|
||||
cwd: StrOrBytesPath | None = None,
|
||||
env: subprocess._ENV | None = None,
|
||||
startupinfo: Any | None = None,
|
||||
creationflags: int = 0,
|
||||
restore_signals: bool = True,
|
||||
start_new_session: bool = False,
|
||||
pass_fds: Collection[int] = ...,
|
||||
group: None | str | int = ...,
|
||||
extra_groups: None | Collection[str | int] = ...,
|
||||
user: None | str | int = ...,
|
||||
umask: int = ...,
|
||||
pipesize: int = ...,
|
||||
group: None | str | int = None,
|
||||
extra_groups: None | Collection[str | int] = None,
|
||||
user: None | str | int = None,
|
||||
umask: int = -1,
|
||||
pipesize: int = -1,
|
||||
) -> Process: ...
|
||||
|
||||
else: # >= 3.9
|
||||
@ -185,22 +185,22 @@ else: # >= 3.9
|
||||
bufsize: Literal[0] = 0,
|
||||
encoding: None = None,
|
||||
errors: None = None,
|
||||
text: Literal[False, None] = ...,
|
||||
text: Literal[False, None] = None,
|
||||
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
|
||||
executable: StrOrBytesPath | None = ...,
|
||||
preexec_fn: Callable[[], Any] | None = ...,
|
||||
close_fds: bool = ...,
|
||||
cwd: StrOrBytesPath | None = ...,
|
||||
env: subprocess._ENV | None = ...,
|
||||
startupinfo: Any | None = ...,
|
||||
creationflags: int = ...,
|
||||
restore_signals: bool = ...,
|
||||
start_new_session: bool = ...,
|
||||
executable: StrOrBytesPath | None = None,
|
||||
preexec_fn: Callable[[], Any] | None = None,
|
||||
close_fds: bool = True,
|
||||
cwd: StrOrBytesPath | None = None,
|
||||
env: subprocess._ENV | None = None,
|
||||
startupinfo: Any | None = None,
|
||||
creationflags: int = 0,
|
||||
restore_signals: bool = True,
|
||||
start_new_session: bool = False,
|
||||
pass_fds: Collection[int] = ...,
|
||||
group: None | str | int = ...,
|
||||
extra_groups: None | Collection[str | int] = ...,
|
||||
user: None | str | int = ...,
|
||||
umask: int = ...,
|
||||
group: None | str | int = None,
|
||||
extra_groups: None | Collection[str | int] = None,
|
||||
user: None | str | int = None,
|
||||
umask: int = -1,
|
||||
) -> Process: ...
|
||||
async def create_subprocess_exec(
|
||||
program: _ExecArg,
|
||||
@ -217,19 +217,19 @@ else: # >= 3.9
|
||||
encoding: None = None,
|
||||
errors: None = None,
|
||||
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
|
||||
text: bool | None = ...,
|
||||
executable: StrOrBytesPath | None = ...,
|
||||
preexec_fn: Callable[[], Any] | None = ...,
|
||||
close_fds: bool = ...,
|
||||
cwd: StrOrBytesPath | None = ...,
|
||||
env: subprocess._ENV | None = ...,
|
||||
startupinfo: Any | None = ...,
|
||||
creationflags: int = ...,
|
||||
restore_signals: bool = ...,
|
||||
start_new_session: bool = ...,
|
||||
text: bool | None = None,
|
||||
executable: StrOrBytesPath | None = None,
|
||||
preexec_fn: Callable[[], Any] | None = None,
|
||||
close_fds: bool = True,
|
||||
cwd: StrOrBytesPath | None = None,
|
||||
env: subprocess._ENV | None = None,
|
||||
startupinfo: Any | None = None,
|
||||
creationflags: int = 0,
|
||||
restore_signals: bool = True,
|
||||
start_new_session: bool = False,
|
||||
pass_fds: Collection[int] = ...,
|
||||
group: None | str | int = ...,
|
||||
extra_groups: None | Collection[str | int] = ...,
|
||||
user: None | str | int = ...,
|
||||
umask: int = ...,
|
||||
group: None | str | int = None,
|
||||
extra_groups: None | Collection[str | int] = None,
|
||||
user: None | str | int = None,
|
||||
umask: int = -1,
|
||||
) -> Process: ...
|
||||
|
@ -140,7 +140,7 @@ if sys.version_info >= (3, 10):
|
||||
tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException, _T5 | BaseException]
|
||||
]: ...
|
||||
@overload
|
||||
def gather(*coros_or_futures: _FutureLike[Any], return_exceptions: bool = False) -> Future[list[Any]]: ... # type: ignore[misc]
|
||||
def gather(*coros_or_futures: _FutureLike[Any], return_exceptions: bool = False) -> Future[list[Any]]: ...
|
||||
|
||||
else:
|
||||
@overload
|
||||
@ -230,7 +230,7 @@ else:
|
||||
tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException, _T5 | BaseException]
|
||||
]: ...
|
||||
@overload
|
||||
def gather( # type: ignore[misc]
|
||||
def gather(
|
||||
*coros_or_futures: _FutureLike[Any], loop: AbstractEventLoop | None = None, return_exceptions: bool = False
|
||||
) -> Future[list[Any]]: ...
|
||||
|
||||
|
@ -110,6 +110,8 @@ class object:
|
||||
|
||||
def __dir__(self) -> Iterable[str]: ...
|
||||
def __init_subclass__(cls) -> None: ...
|
||||
@classmethod
|
||||
def __subclasshook__(cls, __subclass: type) -> bool: ...
|
||||
|
||||
class staticmethod(Generic[_R_co]):
|
||||
@property
|
||||
@ -445,7 +447,7 @@ class str(Sequence[str]):
|
||||
@overload
|
||||
def format(self: LiteralString, *args: LiteralString, **kwargs: LiteralString) -> LiteralString: ...
|
||||
@overload
|
||||
def format(self, *args: object, **kwargs: object) -> str: ... # type: ignore[misc]
|
||||
def format(self, *args: object, **kwargs: object) -> str: ...
|
||||
def format_map(self, map: _FormatMapMapping) -> str: ...
|
||||
def index(self, __sub: str, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...) -> int: ...
|
||||
def isalnum(self) -> bool: ...
|
||||
@ -575,7 +577,7 @@ class str(Sequence[str]):
|
||||
@overload
|
||||
def __mod__(self: LiteralString, __x: LiteralString | tuple[LiteralString, ...]) -> LiteralString: ...
|
||||
@overload
|
||||
def __mod__(self, __x: Any) -> str: ... # type: ignore[misc]
|
||||
def __mod__(self, __x: Any) -> str: ...
|
||||
@overload
|
||||
def __mul__(self: LiteralString, __n: SupportsIndex) -> LiteralString: ...
|
||||
@overload
|
||||
@ -1190,7 +1192,7 @@ class property:
|
||||
def __delete__(self, __instance: Any) -> None: ...
|
||||
|
||||
@final
|
||||
class _NotImplementedType(Any): # type: ignore[misc]
|
||||
class _NotImplementedType(Any):
|
||||
# A little weird, but typing the __call__ as NotImplemented makes the error message
|
||||
# for NotImplemented() much better
|
||||
__call__: NotImplemented # type: ignore[valid-type] # pyright: ignore[reportGeneralTypeIssues]
|
||||
@ -1611,11 +1613,11 @@ if sys.version_info >= (3, 8):
|
||||
@overload
|
||||
def pow(base: int, exp: int, mod: int) -> int: ...
|
||||
@overload
|
||||
def pow(base: int, exp: Literal[0], mod: None = None) -> Literal[1]: ... # type: ignore[misc]
|
||||
def pow(base: int, exp: Literal[0], mod: None = None) -> Literal[1]: ...
|
||||
@overload
|
||||
def pow(base: int, exp: _PositiveInteger, mod: None = None) -> int: ... # type: ignore[misc]
|
||||
def pow(base: int, exp: _PositiveInteger, mod: None = None) -> int: ...
|
||||
@overload
|
||||
def pow(base: int, exp: _NegativeInteger, mod: None = None) -> float: ... # type: ignore[misc]
|
||||
def pow(base: int, exp: _NegativeInteger, mod: None = None) -> float: ...
|
||||
# int base & positive-int exp -> int; int base & negative-int exp -> float
|
||||
# return type must be Any as `int | float` causes too many false-positive errors
|
||||
@overload
|
||||
@ -1648,11 +1650,11 @@ else:
|
||||
@overload
|
||||
def pow(__base: int, __exp: int, __mod: int) -> int: ...
|
||||
@overload
|
||||
def pow(__base: int, __exp: Literal[0], __mod: None = None) -> Literal[1]: ... # type: ignore[misc]
|
||||
def pow(__base: int, __exp: Literal[0], __mod: None = None) -> Literal[1]: ...
|
||||
@overload
|
||||
def pow(__base: int, __exp: _PositiveInteger, __mod: None = None) -> int: ... # type: ignore[misc]
|
||||
def pow(__base: int, __exp: _PositiveInteger, __mod: None = None) -> int: ...
|
||||
@overload
|
||||
def pow(__base: int, __exp: _NegativeInteger, __mod: None = None) -> float: ... # type: ignore[misc]
|
||||
def pow(__base: int, __exp: _NegativeInteger, __mod: None = None) -> float: ...
|
||||
@overload
|
||||
def pow(__base: int, __exp: int, __mod: None = None) -> Any: ...
|
||||
@overload
|
||||
|
@ -80,14 +80,14 @@ class DictReader(Generic[_T], Iterator[_DictReadMapping[_T | Any, str | Any]]):
|
||||
restval: str | None = None,
|
||||
dialect: _DialectLike = "excel",
|
||||
*,
|
||||
delimiter: str = ...,
|
||||
quotechar: str | None = ...,
|
||||
escapechar: str | None = ...,
|
||||
doublequote: bool = ...,
|
||||
skipinitialspace: bool = ...,
|
||||
lineterminator: str = ...,
|
||||
quoting: _QuotingType = ...,
|
||||
strict: bool = ...,
|
||||
delimiter: str = ",",
|
||||
quotechar: str | None = '"',
|
||||
escapechar: str | None = None,
|
||||
doublequote: bool = True,
|
||||
skipinitialspace: bool = False,
|
||||
lineterminator: str = "\r\n",
|
||||
quoting: _QuotingType = 0,
|
||||
strict: bool = False,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def __init__(
|
||||
@ -98,14 +98,14 @@ class DictReader(Generic[_T], Iterator[_DictReadMapping[_T | Any, str | Any]]):
|
||||
restval: str | None = None,
|
||||
dialect: _DialectLike = "excel",
|
||||
*,
|
||||
delimiter: str = ...,
|
||||
quotechar: str | None = ...,
|
||||
escapechar: str | None = ...,
|
||||
doublequote: bool = ...,
|
||||
skipinitialspace: bool = ...,
|
||||
lineterminator: str = ...,
|
||||
quoting: _QuotingType = ...,
|
||||
strict: bool = ...,
|
||||
delimiter: str = ",",
|
||||
quotechar: str | None = '"',
|
||||
escapechar: str | None = None,
|
||||
doublequote: bool = True,
|
||||
skipinitialspace: bool = False,
|
||||
lineterminator: str = "\r\n",
|
||||
quoting: _QuotingType = 0,
|
||||
strict: bool = False,
|
||||
) -> None: ...
|
||||
def __iter__(self) -> Self: ...
|
||||
def __next__(self) -> _DictReadMapping[_T | Any, str | Any]: ...
|
||||
@ -125,14 +125,14 @@ class DictWriter(Generic[_T]):
|
||||
extrasaction: Literal["raise", "ignore"] = "raise",
|
||||
dialect: _DialectLike = "excel",
|
||||
*,
|
||||
delimiter: str = ...,
|
||||
quotechar: str | None = ...,
|
||||
escapechar: str | None = ...,
|
||||
doublequote: bool = ...,
|
||||
skipinitialspace: bool = ...,
|
||||
lineterminator: str = ...,
|
||||
quoting: _QuotingType = ...,
|
||||
strict: bool = ...,
|
||||
delimiter: str = ",",
|
||||
quotechar: str | None = '"',
|
||||
escapechar: str | None = None,
|
||||
doublequote: bool = True,
|
||||
skipinitialspace: bool = False,
|
||||
lineterminator: str = "\r\n",
|
||||
quoting: _QuotingType = 0,
|
||||
strict: bool = False,
|
||||
) -> None: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def writeheader(self) -> Any: ...
|
||||
|
@ -57,9 +57,8 @@ class SequenceMatcher(Generic[_T]):
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
||||
|
||||
# mypy thinks the signatures of the overloads overlap, but the types still work fine
|
||||
@overload
|
||||
def get_close_matches(word: AnyStr, possibilities: Iterable[AnyStr], n: int = 3, cutoff: float = 0.6) -> list[AnyStr]: ... # type: ignore[misc]
|
||||
def get_close_matches(word: AnyStr, possibilities: Iterable[AnyStr], n: int = 3, cutoff: float = 0.6) -> list[AnyStr]: ...
|
||||
@overload
|
||||
def get_close_matches(
|
||||
word: Sequence[_T], possibilities: Iterable[Sequence[_T]], n: int = 3, cutoff: float = 0.6
|
||||
|
@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Callable, Iterable
|
||||
from distutils.dist import Distribution
|
||||
@ -60,3 +61,5 @@ class Command:
|
||||
skip_msg: str | None = None,
|
||||
level: Any = 1,
|
||||
) -> None: ... # level is not used
|
||||
def ensure_finalized(self) -> None: ...
|
||||
def dump_options(self, header: Incomplete | None = None, indent: str = "") -> None: ...
|
||||
|
@ -1,9 +1,17 @@
|
||||
from _typeshed import StrOrBytesPath
|
||||
from collections.abc import Mapping
|
||||
from distutils.cmd import Command as Command
|
||||
from distutils.dist import Distribution as Distribution
|
||||
from distutils.extension import Extension as Extension
|
||||
from typing import Any
|
||||
|
||||
USAGE: str
|
||||
|
||||
def gen_usage(script_name: StrOrBytesPath) -> str: ...
|
||||
|
||||
setup_keywords: tuple[str, ...]
|
||||
extension_keywords: tuple[str, ...]
|
||||
|
||||
def setup(
|
||||
*,
|
||||
name: str = ...,
|
||||
|
@ -1,4 +1,20 @@
|
||||
from distutils.unixccompiler import UnixCCompiler
|
||||
from distutils.version import LooseVersion
|
||||
from re import Pattern
|
||||
from typing_extensions import Literal
|
||||
|
||||
def get_msvcr() -> list[str] | None: ...
|
||||
|
||||
class CygwinCCompiler(UnixCCompiler): ...
|
||||
class Mingw32CCompiler(CygwinCCompiler): ...
|
||||
|
||||
CONFIG_H_OK: str
|
||||
CONFIG_H_NOTOK: str
|
||||
CONFIG_H_UNCERTAIN: str
|
||||
|
||||
def check_config_h() -> tuple[Literal["ok", "not ok", "uncertain"], str]: ...
|
||||
|
||||
RE_VERSION: Pattern[bytes]
|
||||
|
||||
def get_versions() -> tuple[LooseVersion | None, ...]: ...
|
||||
def is_cygwingcc() -> bool: ...
|
||||
|
@ -1,8 +1,11 @@
|
||||
from _typeshed import FileDescriptorOrPath, SupportsWrite
|
||||
from _typeshed import FileDescriptorOrPath, Incomplete, SupportsWrite
|
||||
from collections.abc import Iterable, Mapping
|
||||
from distutils.cmd import Command
|
||||
from re import Pattern
|
||||
from typing import IO, Any
|
||||
|
||||
command_re: Pattern[str]
|
||||
|
||||
class DistributionMetadata:
|
||||
def __init__(self, path: FileDescriptorOrPath | None = None) -> None: ...
|
||||
name: str | None
|
||||
@ -57,3 +60,57 @@ class Distribution:
|
||||
def get_option_dict(self, command: str) -> dict[str, tuple[str, str]]: ...
|
||||
def parse_config_files(self, filenames: Iterable[str] | None = None) -> None: ...
|
||||
def get_command_obj(self, command: str, create: bool = ...) -> Command | None: ...
|
||||
global_options: Incomplete
|
||||
common_usage: str
|
||||
display_options: Incomplete
|
||||
display_option_names: Incomplete
|
||||
negative_opt: Incomplete
|
||||
verbose: int
|
||||
dry_run: int
|
||||
help: int
|
||||
command_packages: Incomplete
|
||||
script_name: Incomplete
|
||||
script_args: Incomplete
|
||||
command_options: Incomplete
|
||||
dist_files: Incomplete
|
||||
packages: Incomplete
|
||||
package_data: Incomplete
|
||||
package_dir: Incomplete
|
||||
py_modules: Incomplete
|
||||
libraries: Incomplete
|
||||
headers: Incomplete
|
||||
ext_modules: Incomplete
|
||||
ext_package: Incomplete
|
||||
include_dirs: Incomplete
|
||||
extra_path: Incomplete
|
||||
scripts: Incomplete
|
||||
data_files: Incomplete
|
||||
password: str
|
||||
command_obj: Incomplete
|
||||
have_run: Incomplete
|
||||
want_user_cfg: bool
|
||||
def dump_option_dicts(
|
||||
self, header: Incomplete | None = None, commands: Incomplete | None = None, indent: str = ""
|
||||
) -> None: ...
|
||||
def find_config_files(self): ...
|
||||
commands: Incomplete
|
||||
def parse_command_line(self): ...
|
||||
def finalize_options(self) -> None: ...
|
||||
def handle_display_options(self, option_order): ...
|
||||
def print_command_list(self, commands, header, max_length) -> None: ...
|
||||
def print_commands(self) -> None: ...
|
||||
def get_command_list(self): ...
|
||||
def get_command_packages(self): ...
|
||||
def get_command_class(self, command): ...
|
||||
def reinitialize_command(self, command, reinit_subcommands: int = 0): ...
|
||||
def announce(self, msg, level: int = ...) -> None: ...
|
||||
def run_commands(self) -> None: ...
|
||||
def run_command(self, command) -> None: ...
|
||||
def has_pure_modules(self): ...
|
||||
def has_ext_modules(self): ...
|
||||
def has_c_libraries(self): ...
|
||||
def has_modules(self): ...
|
||||
def has_headers(self): ...
|
||||
def has_scripts(self): ...
|
||||
def has_data_files(self): ...
|
||||
def is_pure(self): ...
|
||||
|
@ -1,14 +1,15 @@
|
||||
from collections.abc import Iterable, Mapping
|
||||
from re import Pattern
|
||||
from typing import Any, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
_Option: TypeAlias = tuple[str, str | None, str]
|
||||
_GR: TypeAlias = tuple[list[str], OptionDummy]
|
||||
|
||||
def fancy_getopt(
|
||||
options: list[_Option], negative_opt: Mapping[_Option, _Option], object: Any, args: list[str] | None
|
||||
) -> list[str] | _GR: ...
|
||||
def wrap_text(text: str, width: int) -> list[str]: ...
|
||||
longopt_pat: str
|
||||
longopt_re: Pattern[str]
|
||||
neg_alias_re: Pattern[str]
|
||||
longopt_xlate: dict[int, int]
|
||||
|
||||
class FancyGetopt:
|
||||
def __init__(self, option_table: list[_Option] | None = None) -> None: ...
|
||||
@ -20,5 +21,14 @@ class FancyGetopt:
|
||||
def get_option_order(self) -> list[tuple[str, str]]: ...
|
||||
def generate_help(self, header: str | None = None) -> list[str]: ...
|
||||
|
||||
def fancy_getopt(
|
||||
options: list[_Option], negative_opt: Mapping[_Option, _Option], object: Any, args: list[str] | None
|
||||
) -> list[str] | _GR: ...
|
||||
|
||||
WS_TRANS: dict[int, str]
|
||||
|
||||
def wrap_text(text: str, width: int) -> list[str]: ...
|
||||
def translate_longopt(opt: str) -> str: ...
|
||||
|
||||
class OptionDummy:
|
||||
def __init__(self, options: Iterable[str] = ...) -> None: ...
|
||||
|
@ -1,9 +1,15 @@
|
||||
import sys
|
||||
from collections.abc import Mapping
|
||||
from distutils.ccompiler import CCompiler
|
||||
|
||||
PREFIX: str
|
||||
EXEC_PREFIX: str
|
||||
BASE_PREFIX: str
|
||||
BASE_EXEC_PREFIX: str
|
||||
project_base: str
|
||||
python_build: bool
|
||||
|
||||
def expand_makefile_vars(s: str, vars: Mapping[str, str]) -> str: ...
|
||||
def get_config_var(name: str) -> int | str | None: ...
|
||||
def get_config_vars(*args: str) -> Mapping[str, int | str]: ...
|
||||
def get_config_h_filename() -> str: ...
|
||||
@ -11,3 +17,6 @@ def get_makefile_filename() -> str: ...
|
||||
def get_python_inc(plat_specific: bool = ..., prefix: str | None = None) -> str: ...
|
||||
def get_python_lib(plat_specific: bool = ..., standard_lib: bool = ..., prefix: str | None = None) -> str: ...
|
||||
def customize_compiler(compiler: CCompiler) -> None: ...
|
||||
|
||||
if sys.version_info < (3, 10):
|
||||
def get_python_version() -> str: ...
|
||||
|
@ -1,8 +1,12 @@
|
||||
import sys
|
||||
from _typeshed import StrPath, Unused
|
||||
from collections.abc import Callable, Container, Iterable, Mapping
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def get_host_platform() -> str: ...
|
||||
|
||||
def get_platform() -> str: ...
|
||||
def convert_path(pathname: str) -> str: ...
|
||||
def change_root(new_root: str, pathname: str) -> str: ...
|
||||
|
@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer
|
||||
class IncrementalEncoder(codecs.IncrementalEncoder):
|
||||
def __init__(self, errors: str = "strict") -> None: ...
|
||||
def encode(self, input: str, final: bool = False) -> bytes: ...
|
||||
def getstate(self) -> int: ... # type: ignore[override]
|
||||
def getstate(self) -> int: ...
|
||||
def setstate(self, state: int) -> None: ... # type: ignore[override]
|
||||
|
||||
class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
|
||||
|
@ -114,7 +114,7 @@ class EnumMeta(ABCMeta):
|
||||
def __bool__(self) -> Literal[True]: ...
|
||||
def __dir__(self) -> list[str]: ...
|
||||
# Simple value lookup
|
||||
@overload # type: ignore[override]
|
||||
@overload
|
||||
def __call__(cls: type[_EnumMemberT], value: Any, names: None = None) -> _EnumMemberT: ...
|
||||
# Functional Enum API
|
||||
if sys.version_info >= (3, 11):
|
||||
|
@ -1,9 +1,9 @@
|
||||
import sys
|
||||
import types
|
||||
from _typeshed import IdentityFunction, SupportsAllComparisons, SupportsItems
|
||||
from _typeshed import SupportsAllComparisons, SupportsItems
|
||||
from collections.abc import Callable, Hashable, Iterable, Sequence, Sized
|
||||
from typing import Any, Generic, NamedTuple, TypeVar, overload
|
||||
from typing_extensions import Literal, Self, TypeAlias, final
|
||||
from typing_extensions import Literal, ParamSpec, Self, TypeAlias, final
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
@ -28,10 +28,12 @@ if sys.version_info >= (3, 8):
|
||||
if sys.version_info >= (3, 9):
|
||||
__all__ += ["cache"]
|
||||
|
||||
_AnyCallable: TypeAlias = Callable[..., object]
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_S = TypeVar("_S")
|
||||
_PWrapped = ParamSpec("_PWrapped")
|
||||
_RWrapped = TypeVar("_RWrapped")
|
||||
_PWrapper = ParamSpec("_PWrapper")
|
||||
_RWapper = TypeVar("_RWapper")
|
||||
|
||||
@overload
|
||||
def reduce(function: Callable[[_T, _S], _T], sequence: Iterable[_S], initial: _T) -> _T: ...
|
||||
@ -67,8 +69,22 @@ WRAPPER_ASSIGNMENTS: tuple[
|
||||
]
|
||||
WRAPPER_UPDATES: tuple[Literal["__dict__"]]
|
||||
|
||||
def update_wrapper(wrapper: _T, wrapped: _AnyCallable, assigned: Sequence[str] = ..., updated: Sequence[str] = ...) -> _T: ...
|
||||
def wraps(wrapped: _AnyCallable, assigned: Sequence[str] = ..., updated: Sequence[str] = ...) -> IdentityFunction: ...
|
||||
class _Wrapped(Generic[_PWrapped, _RWrapped, _PWrapper, _RWapper]):
|
||||
__wrapped__: Callable[_PWrapped, _RWrapped]
|
||||
def __call__(self, *args: _PWrapper.args, **kwargs: _PWrapper.kwargs) -> _RWapper: ...
|
||||
|
||||
class _Wrapper(Generic[_PWrapped, _RWrapped]):
|
||||
def __call__(self, f: Callable[_PWrapper, _RWapper]) -> _Wrapped[_PWrapped, _RWrapped, _PWrapper, _RWapper]: ...
|
||||
|
||||
def update_wrapper(
|
||||
wrapper: Callable[_PWrapper, _RWapper],
|
||||
wrapped: Callable[_PWrapped, _RWrapped],
|
||||
assigned: Sequence[str] = ...,
|
||||
updated: Sequence[str] = ...,
|
||||
) -> _Wrapped[_PWrapped, _RWrapped, _PWrapper, _RWapper]: ...
|
||||
def wraps(
|
||||
wrapped: Callable[_PWrapped, _RWrapped], assigned: Sequence[str] = ..., updated: Sequence[str] = ...
|
||||
) -> _Wrapper[_PWrapped, _RWrapped]: ...
|
||||
def total_ordering(cls: type[_T]) -> type[_T]: ...
|
||||
def cmp_to_key(mycmp: Callable[[_T, _T], int]) -> Callable[[_T], SupportsAllComparisons]: ...
|
||||
|
||||
|
@ -57,8 +57,8 @@ class GNUTranslations(NullTranslations):
|
||||
CONTEXT: str
|
||||
VERSIONS: Sequence[int]
|
||||
|
||||
@overload # ignores incompatible overloads
|
||||
def find( # type: ignore[misc]
|
||||
@overload
|
||||
def find(
|
||||
domain: str, localedir: StrPath | None = None, languages: Iterable[str] | None = None, all: Literal[False] = False
|
||||
) -> str | None: ...
|
||||
@overload
|
||||
|
@ -30,7 +30,13 @@ class HMAC:
|
||||
block_size: int
|
||||
@property
|
||||
def name(self) -> str: ...
|
||||
def __init__(self, key: bytes | bytearray, msg: ReadableBuffer | None = None, digestmod: _DigestMod = "") -> None: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def __init__(self, key: bytes | bytearray, msg: ReadableBuffer | None = None, digestmod: _DigestMod = "") -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self, key: bytes | bytearray, msg: ReadableBuffer | None = None, digestmod: _DigestMod | None = None
|
||||
) -> None: ...
|
||||
|
||||
def update(self, msg: ReadableBuffer) -> None: ...
|
||||
def digest(self) -> bytes: ...
|
||||
def hexdigest(self) -> str: ...
|
||||
|
@ -174,7 +174,7 @@ class HTTPConnection:
|
||||
|
||||
class HTTPSConnection(HTTPConnection):
|
||||
# Can be `None` if `.connect()` was not called:
|
||||
sock: ssl.SSLSocket | Any # type: ignore[override]
|
||||
sock: ssl.SSLSocket | Any
|
||||
def __init__(
|
||||
self,
|
||||
host: str,
|
||||
|
@ -191,7 +191,7 @@ if sys.version_info >= (3, 9):
|
||||
class TraversableResources(ResourceReader):
|
||||
@abstractmethod
|
||||
def files(self) -> Traversable: ...
|
||||
def open_resource(self, resource: str) -> BufferedReader: ... # type: ignore[override]
|
||||
def open_resource(self, resource: str) -> BufferedReader: ...
|
||||
def resource_path(self, resource: Any) -> NoReturn: ...
|
||||
def is_resource(self, path: str) -> bool: ...
|
||||
def contents(self) -> Iterator[str]: ...
|
||||
|
@ -116,74 +116,74 @@ class Logger(Filterer):
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def info(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def warning(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def warn(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def error(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def exception(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = True,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def critical(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def log(
|
||||
self,
|
||||
level: int,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def _log(
|
||||
self,
|
||||
@ -200,66 +200,66 @@ class Logger(Filterer):
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def info(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def warning(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def warn(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def error(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def critical(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def log(
|
||||
self,
|
||||
level: int,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def exception(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = True,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def _log(
|
||||
self,
|
||||
@ -432,50 +432,50 @@ class LoggerAdapter(Generic[_L]):
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
def info(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
def warning(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
def warn(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
def error(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
def exception(
|
||||
@ -483,19 +483,19 @@ class LoggerAdapter(Generic[_L]):
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = True,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
def critical(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
def log(
|
||||
@ -503,10 +503,10 @@ class LoggerAdapter(Generic[_L]):
|
||||
level: int,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
else:
|
||||
@ -514,45 +514,45 @@ class LoggerAdapter(Generic[_L]):
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
def info(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
def warning(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
def warn(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
def error(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
def exception(
|
||||
@ -560,17 +560,17 @@ class LoggerAdapter(Generic[_L]):
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = True,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
def critical(
|
||||
self,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
def log(
|
||||
@ -578,9 +578,9 @@ class LoggerAdapter(Generic[_L]):
|
||||
level: int,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
**kwargs: object,
|
||||
) -> None: ...
|
||||
|
||||
@ -610,102 +610,126 @@ if sys.version_info >= (3, 8):
|
||||
def debug(
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def info(
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def warning(
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def warn(
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def error(
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def critical(
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def exception(
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = True,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def log(
|
||||
level: int,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
stacklevel: int = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
|
||||
else:
|
||||
def debug(
|
||||
msg: object, *args: object, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Mapping[str, object] | None = ...
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def info(
|
||||
msg: object, *args: object, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Mapping[str, object] | None = ...
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def warning(
|
||||
msg: object, *args: object, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Mapping[str, object] | None = ...
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def warn(
|
||||
msg: object, *args: object, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Mapping[str, object] | None = ...
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def error(
|
||||
msg: object, *args: object, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Mapping[str, object] | None = ...
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def critical(
|
||||
msg: object, *args: object, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Mapping[str, object] | None = ...
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def exception(
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = True,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
def log(
|
||||
level: int,
|
||||
msg: object,
|
||||
*args: object,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
stack_info: bool = ...,
|
||||
extra: Mapping[str, object] | None = ...,
|
||||
exc_info: _ExcInfoType = None,
|
||||
stack_info: bool = False,
|
||||
extra: Mapping[str, object] | None = None,
|
||||
) -> None: ...
|
||||
|
||||
fatal = critical
|
||||
|
@ -1,14 +1,13 @@
|
||||
from multiprocessing.connection import _Address
|
||||
from queue import Queue
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import Self, TypeAlias
|
||||
from typing_extensions import Self
|
||||
|
||||
__all__ = ["Client", "Listener", "Pipe"]
|
||||
|
||||
families: list[None]
|
||||
|
||||
_Address: TypeAlias = str | tuple[str, int]
|
||||
|
||||
class Connection:
|
||||
_in: Any
|
||||
_out: Any
|
||||
|
@ -664,7 +664,7 @@ class socket(_socket.socket):
|
||||
# Note that the makefile's documented windows-specific behavior is not represented
|
||||
# mode strings with duplicates are intentionally excluded
|
||||
@overload
|
||||
def makefile( # type: ignore[misc]
|
||||
def makefile(
|
||||
self,
|
||||
mode: Literal["b", "rb", "br", "wb", "bw", "rwb", "rbw", "wrb", "wbr", "brw", "bwr"],
|
||||
buffering: Literal[0],
|
||||
@ -725,9 +725,9 @@ class socket(_socket.socket):
|
||||
) -> TextIOWrapper: ...
|
||||
def sendfile(self, file: _SendableFile, offset: int = 0, count: int | None = None) -> int: ...
|
||||
@property
|
||||
def family(self) -> AddressFamily: ... # type: ignore[override]
|
||||
def family(self) -> AddressFamily: ...
|
||||
@property
|
||||
def type(self) -> SocketKind: ... # type: ignore[override]
|
||||
def type(self) -> SocketKind: ...
|
||||
def get_inheritable(self) -> bool: ...
|
||||
def set_inheritable(self, inheritable: bool) -> None: ...
|
||||
|
||||
|
@ -30,7 +30,7 @@ if sys.platform != "win32":
|
||||
]
|
||||
|
||||
_RequestType: TypeAlias = _socket | tuple[bytes, _socket]
|
||||
_AfUnixAddress: TypeAlias = str | ReadableBuffer # adddress acceptable for an AF_UNIX socket
|
||||
_AfUnixAddress: TypeAlias = str | ReadableBuffer # address acceptable for an AF_UNIX socket
|
||||
_AfInetAddress: TypeAlias = tuple[str | bytes | bytearray, int] # address acceptable for an AF_INET socket
|
||||
|
||||
# This can possibly be generic at some point:
|
||||
@ -70,7 +70,7 @@ class BaseServer:
|
||||
class TCPServer(BaseServer):
|
||||
if sys.version_info >= (3, 11):
|
||||
allow_reuse_port: bool
|
||||
server_address: _AfInetAddress # type: ignore[assignment]
|
||||
server_address: _AfInetAddress
|
||||
def __init__(
|
||||
self,
|
||||
server_address: _AfInetAddress,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -55,49 +55,49 @@ def wrap(
|
||||
text: str,
|
||||
width: int = 70,
|
||||
*,
|
||||
initial_indent: str = ...,
|
||||
subsequent_indent: str = ...,
|
||||
expand_tabs: bool = ...,
|
||||
tabsize: int = ...,
|
||||
replace_whitespace: bool = ...,
|
||||
fix_sentence_endings: bool = ...,
|
||||
break_long_words: bool = ...,
|
||||
break_on_hyphens: bool = ...,
|
||||
drop_whitespace: bool = ...,
|
||||
initial_indent: str = "",
|
||||
subsequent_indent: str = "",
|
||||
expand_tabs: bool = True,
|
||||
tabsize: int = 8,
|
||||
replace_whitespace: bool = True,
|
||||
fix_sentence_endings: bool = False,
|
||||
break_long_words: bool = True,
|
||||
break_on_hyphens: bool = True,
|
||||
drop_whitespace: bool = True,
|
||||
max_lines: int | None = None,
|
||||
placeholder: str = ...,
|
||||
placeholder: str = " [...]",
|
||||
) -> list[str]: ...
|
||||
def fill(
|
||||
text: str,
|
||||
width: int = 70,
|
||||
*,
|
||||
initial_indent: str = ...,
|
||||
subsequent_indent: str = ...,
|
||||
expand_tabs: bool = ...,
|
||||
tabsize: int = ...,
|
||||
replace_whitespace: bool = ...,
|
||||
fix_sentence_endings: bool = ...,
|
||||
break_long_words: bool = ...,
|
||||
break_on_hyphens: bool = ...,
|
||||
drop_whitespace: bool = ...,
|
||||
initial_indent: str = "",
|
||||
subsequent_indent: str = "",
|
||||
expand_tabs: bool = True,
|
||||
tabsize: int = 8,
|
||||
replace_whitespace: bool = True,
|
||||
fix_sentence_endings: bool = False,
|
||||
break_long_words: bool = True,
|
||||
break_on_hyphens: bool = True,
|
||||
drop_whitespace: bool = True,
|
||||
max_lines: int | None = None,
|
||||
placeholder: str = ...,
|
||||
placeholder: str = " [...]",
|
||||
) -> str: ...
|
||||
def shorten(
|
||||
text: str,
|
||||
width: int,
|
||||
*,
|
||||
initial_indent: str = ...,
|
||||
subsequent_indent: str = ...,
|
||||
expand_tabs: bool = ...,
|
||||
tabsize: int = ...,
|
||||
replace_whitespace: bool = ...,
|
||||
fix_sentence_endings: bool = ...,
|
||||
break_long_words: bool = ...,
|
||||
break_on_hyphens: bool = ...,
|
||||
drop_whitespace: bool = ...,
|
||||
initial_indent: str = "",
|
||||
subsequent_indent: str = "",
|
||||
expand_tabs: bool = True,
|
||||
tabsize: int = 8,
|
||||
replace_whitespace: bool = True,
|
||||
fix_sentence_endings: bool = False,
|
||||
break_long_words: bool = True,
|
||||
break_on_hyphens: bool = True,
|
||||
drop_whitespace: bool = True,
|
||||
# Omit `max_lines: int = None`, it is forced to 1 here.
|
||||
placeholder: str = ...,
|
||||
placeholder: str = " [...]",
|
||||
) -> str: ...
|
||||
def dedent(text: str) -> str: ...
|
||||
def indent(text: str, prefix: str, predicate: Callable[[str], bool] | None = None) -> str: ...
|
||||
|
@ -3207,7 +3207,7 @@ class OptionMenu(Menubutton):
|
||||
# destroy and __getitem__ are overridden, signature does not change
|
||||
|
||||
# Marker to indicate that it is a valid bitmap/photo image. PIL implements compatible versions
|
||||
# which don't share a class hierachy. The actual API is a __str__() which returns a valid name,
|
||||
# which don't share a class hierarchy. The actual API is a __str__() which returns a valid name,
|
||||
# not something that type checkers can detect.
|
||||
@type_check_only
|
||||
class _Image: ...
|
||||
|
@ -132,12 +132,12 @@ class TracebackException:
|
||||
cls,
|
||||
exc: BaseException,
|
||||
*,
|
||||
limit: int | None = ...,
|
||||
lookup_lines: bool = ...,
|
||||
capture_locals: bool = ...,
|
||||
compact: bool = ...,
|
||||
max_group_width: int = ...,
|
||||
max_group_depth: int = ...,
|
||||
limit: int | None = None,
|
||||
lookup_lines: bool = True,
|
||||
capture_locals: bool = False,
|
||||
compact: bool = False,
|
||||
max_group_width: int = 15,
|
||||
max_group_depth: int = 10,
|
||||
) -> Self: ...
|
||||
elif sys.version_info >= (3, 10):
|
||||
def __init__(
|
||||
@ -157,10 +157,10 @@ class TracebackException:
|
||||
cls,
|
||||
exc: BaseException,
|
||||
*,
|
||||
limit: int | None = ...,
|
||||
lookup_lines: bool = ...,
|
||||
capture_locals: bool = ...,
|
||||
compact: bool = ...,
|
||||
limit: int | None = None,
|
||||
lookup_lines: bool = True,
|
||||
capture_locals: bool = False,
|
||||
compact: bool = False,
|
||||
) -> Self: ...
|
||||
else:
|
||||
def __init__(
|
||||
@ -176,7 +176,7 @@ class TracebackException:
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def from_exception(
|
||||
cls, exc: BaseException, *, limit: int | None = ..., lookup_lines: bool = ..., capture_locals: bool = ...
|
||||
cls, exc: BaseException, *, limit: int | None = None, lookup_lines: bool = True, capture_locals: bool = False
|
||||
) -> Self: ...
|
||||
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
@ -20,6 +20,11 @@ from types import (
|
||||
)
|
||||
from typing_extensions import Never as _Never, ParamSpec as _ParamSpec, final as _final
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
from types import UnionType
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
__all__ = [
|
||||
"AbstractSet",
|
||||
"Any",
|
||||
@ -254,7 +259,7 @@ _T_contra = TypeVar("_T_contra", contravariant=True) # Ditto contravariant.
|
||||
_TC = TypeVar("_TC", bound=Type[object])
|
||||
|
||||
def no_type_check(arg: _F) -> _F: ...
|
||||
def no_type_check_decorator(decorator: Callable[_P, _T]) -> Callable[_P, _T]: ... # type: ignore[misc]
|
||||
def no_type_check_decorator(decorator: Callable[_P, _T]) -> Callable[_P, _T]: ...
|
||||
|
||||
# Type aliases and type constructors
|
||||
|
||||
@ -745,9 +750,21 @@ else:
|
||||
) -> dict[str, Any]: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def get_origin(tp: Any) -> Any | None: ...
|
||||
def get_args(tp: Any) -> tuple[Any, ...]: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
@overload
|
||||
def get_origin(tp: ParamSpecArgs | ParamSpecKwargs) -> ParamSpec: ...
|
||||
@overload
|
||||
def get_origin(tp: UnionType) -> type[UnionType]: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
@overload
|
||||
def get_origin(tp: GenericAlias) -> type: ...
|
||||
@overload
|
||||
def get_origin(tp: Any) -> Any | None: ...
|
||||
else:
|
||||
def get_origin(tp: Any) -> Any | None: ...
|
||||
|
||||
@overload
|
||||
def cast(typ: Type[_T], val: Any) -> _T: ...
|
||||
@overload
|
||||
|
@ -32,6 +32,11 @@ from typing import ( # noqa: Y022,Y039
|
||||
type_check_only,
|
||||
)
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
from types import UnionType
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
__all__ = [
|
||||
"Any",
|
||||
"ClassVar",
|
||||
@ -155,6 +160,18 @@ def get_type_hints(
|
||||
include_extras: bool = False,
|
||||
) -> dict[str, Any]: ...
|
||||
def get_args(tp: Any) -> tuple[Any, ...]: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
@overload
|
||||
def get_origin(tp: UnionType) -> type[UnionType]: ...
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
@overload
|
||||
def get_origin(tp: GenericAlias) -> type: ...
|
||||
|
||||
@overload
|
||||
def get_origin(tp: ParamSpecArgs | ParamSpecKwargs) -> ParamSpec: ...
|
||||
@overload
|
||||
def get_origin(tp: Any) -> Any | None: ...
|
||||
|
||||
Annotated: _SpecialForm
|
||||
|
@ -132,7 +132,7 @@ class TestCase:
|
||||
# are not using `ParamSpec` intentionally,
|
||||
# because they might be used with explicitly wrong arg types to raise some error in tests.
|
||||
@overload
|
||||
def assertRaises( # type: ignore[misc]
|
||||
def assertRaises(
|
||||
self,
|
||||
expected_exception: type[BaseException] | tuple[type[BaseException], ...],
|
||||
callable: Callable[..., Any],
|
||||
@ -144,7 +144,7 @@ class TestCase:
|
||||
self, expected_exception: type[_E] | tuple[type[_E], ...], *, msg: Any = ...
|
||||
) -> _AssertRaisesContext[_E]: ...
|
||||
@overload
|
||||
def assertRaisesRegex( # type: ignore[misc]
|
||||
def assertRaisesRegex(
|
||||
self,
|
||||
expected_exception: type[BaseException] | tuple[type[BaseException], ...],
|
||||
expected_regex: str | Pattern[str],
|
||||
@ -157,7 +157,7 @@ class TestCase:
|
||||
self, expected_exception: type[_E] | tuple[type[_E], ...], expected_regex: str | Pattern[str], *, msg: Any = ...
|
||||
) -> _AssertRaisesContext[_E]: ...
|
||||
@overload
|
||||
def assertWarns( # type: ignore[misc]
|
||||
def assertWarns(
|
||||
self,
|
||||
expected_warning: type[Warning] | tuple[type[Warning], ...],
|
||||
callable: Callable[_P, Any],
|
||||
@ -169,7 +169,7 @@ class TestCase:
|
||||
self, expected_warning: type[Warning] | tuple[type[Warning], ...], *, msg: Any = ...
|
||||
) -> _AssertWarnsContext: ...
|
||||
@overload
|
||||
def assertWarnsRegex( # type: ignore[misc]
|
||||
def assertWarnsRegex(
|
||||
self,
|
||||
expected_warning: type[Warning] | tuple[type[Warning], ...],
|
||||
expected_regex: str | Pattern[str],
|
||||
|
@ -58,13 +58,13 @@ if sys.version_info >= (3, 8):
|
||||
*,
|
||||
out: None = None,
|
||||
from_file: _FileRead | None = None,
|
||||
with_comments: bool = ...,
|
||||
strip_text: bool = ...,
|
||||
rewrite_prefixes: bool = ...,
|
||||
qname_aware_tags: Iterable[str] | None = ...,
|
||||
qname_aware_attrs: Iterable[str] | None = ...,
|
||||
exclude_attrs: Iterable[str] | None = ...,
|
||||
exclude_tags: Iterable[str] | None = ...,
|
||||
with_comments: bool = False,
|
||||
strip_text: bool = False,
|
||||
rewrite_prefixes: bool = False,
|
||||
qname_aware_tags: Iterable[str] | None = None,
|
||||
qname_aware_attrs: Iterable[str] | None = None,
|
||||
exclude_attrs: Iterable[str] | None = None,
|
||||
exclude_tags: Iterable[str] | None = None,
|
||||
) -> str: ...
|
||||
@overload
|
||||
def canonicalize(
|
||||
@ -72,13 +72,13 @@ if sys.version_info >= (3, 8):
|
||||
*,
|
||||
out: SupportsWrite[str],
|
||||
from_file: _FileRead | None = None,
|
||||
with_comments: bool = ...,
|
||||
strip_text: bool = ...,
|
||||
rewrite_prefixes: bool = ...,
|
||||
qname_aware_tags: Iterable[str] | None = ...,
|
||||
qname_aware_attrs: Iterable[str] | None = ...,
|
||||
exclude_attrs: Iterable[str] | None = ...,
|
||||
exclude_tags: Iterable[str] | None = ...,
|
||||
with_comments: bool = False,
|
||||
strip_text: bool = False,
|
||||
rewrite_prefixes: bool = False,
|
||||
qname_aware_tags: Iterable[str] | None = None,
|
||||
qname_aware_attrs: Iterable[str] | None = None,
|
||||
exclude_attrs: Iterable[str] | None = None,
|
||||
exclude_tags: Iterable[str] | None = None,
|
||||
) -> None: ...
|
||||
|
||||
class Element:
|
||||
|
@ -1,12 +1,11 @@
|
||||
from _typeshed import Unused
|
||||
from collections.abc import Sequence
|
||||
from ctypes import _CVoidConstPLike
|
||||
from typing import TypeVar
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from d3dshot.capture_output import CaptureOutput
|
||||
from PIL import Image
|
||||
|
||||
_Unused: TypeAlias = object
|
||||
_ImageT = TypeVar("_ImageT", bound=Image.Image)
|
||||
|
||||
class PILCaptureOutput(CaptureOutput):
|
||||
@ -22,4 +21,4 @@ class PILCaptureOutput(CaptureOutput):
|
||||
rotation: int,
|
||||
) -> Image.Image: ...
|
||||
def to_pil(self, frame: _ImageT) -> _ImageT: ...
|
||||
def stack(self, frames: Sequence[_ImageT], stack_dimension: _Unused) -> Sequence[_ImageT]: ...
|
||||
def stack(self, frames: Sequence[_ImageT], stack_dimension: Unused) -> Sequence[_ImageT]: ...
|
||||
|
@ -1,4 +1,5 @@
|
||||
import sys
|
||||
from _typeshed import Unused
|
||||
from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
|
||||
from typing import Any, NoReturn, overload
|
||||
from typing_extensions import Literal, Self
|
||||
@ -80,7 +81,7 @@ class Client:
|
||||
session_id: str | None = ...,
|
||||
) -> None: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: object) -> None: ...
|
||||
def __exit__(self, *args: Unused) -> None: ...
|
||||
@property
|
||||
def name(self) -> str: ...
|
||||
@property
|
||||
|
@ -1,4 +1,5 @@
|
||||
version = "9.4.*"
|
||||
|
||||
[tool.stubtest]
|
||||
stubtest_requirements = ["olefile"]
|
||||
ignore_missing_stub = true
|
||||
|
@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete, SupportsRead, SupportsWrite
|
||||
from _typeshed import Incomplete, SupportsRead, SupportsWrite, Unused
|
||||
from collections.abc import Callable, Iterable, Iterator, MutableMapping, Sequence
|
||||
from enum import IntEnum
|
||||
from pathlib import Path
|
||||
@ -172,7 +172,7 @@ class Image:
|
||||
@property
|
||||
def size(self) -> tuple[int, int]: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: object) -> None: ...
|
||||
def __exit__(self, *args: Unused) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __getstate__(self) -> _ImageState: ...
|
||||
|
@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, Unused
|
||||
from typing import Any, NoReturn
|
||||
from typing_extensions import Self
|
||||
|
||||
@ -42,7 +42,7 @@ class Parser:
|
||||
decode: Any
|
||||
def feed(self, data) -> None: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: object) -> None: ...
|
||||
def __exit__(self, *args: Unused) -> None: ...
|
||||
def close(self) -> Image: ...
|
||||
|
||||
class PyCodecState:
|
||||
|
@ -1,4 +1,4 @@
|
||||
from _typeshed import SupportsWrite
|
||||
from _typeshed import SupportsWrite, Unused
|
||||
|
||||
from .Image import Image
|
||||
|
||||
@ -6,7 +6,7 @@ class PSDraw:
|
||||
fp: SupportsWrite[bytes]
|
||||
def __init__(self, fp: SupportsWrite[bytes] | None = ...) -> None: ...
|
||||
isofont: dict[bytes, int]
|
||||
def begin_document(self, id: object | None = ...) -> None: ...
|
||||
def begin_document(self, id: Unused = None) -> None: ...
|
||||
def end_document(self) -> None: ...
|
||||
def setfont(self, font: str, size: int) -> None: ...
|
||||
def line(self, xy0: tuple[int, int], xy1: tuple[int, int]) -> None: ...
|
||||
|
@ -1,6 +1,8 @@
|
||||
import collections
|
||||
from _typeshed import Incomplete
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
|
||||
def encode_text(s: str) -> bytes: ...
|
||||
|
||||
@ -95,7 +97,9 @@ class PdfParser:
|
||||
mode: str = ...,
|
||||
) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type, exc_value, traceback): ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
|
||||
) -> Literal[False]: ...
|
||||
def start_writing(self) -> None: ...
|
||||
def close_buf(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, Unused
|
||||
from enum import IntEnum
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
@ -33,7 +33,7 @@ class ChunkStream:
|
||||
def __init__(self, fp) -> None: ...
|
||||
def read(self): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, *args) -> None: ...
|
||||
def __exit__(self, *args: Unused) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def push(self, cid, pos, length) -> None: ...
|
||||
def call(self, cid, pos, length): ...
|
||||
|
@ -1,3 +1,4 @@
|
||||
from _typeshed import Unused
|
||||
from typing import Any
|
||||
|
||||
from .ContainerIO import ContainerIO
|
||||
@ -6,5 +7,5 @@ class TarIO(ContainerIO):
|
||||
fh: Any
|
||||
def __init__(self, tarfile, file) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, *args) -> None: ...
|
||||
def __exit__(self, *args: Unused) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import MutableMapping
|
||||
from numbers import Rational
|
||||
from types import TracebackType
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
@ -171,7 +172,9 @@ class AppendingTiffWriter:
|
||||
def finalize(self) -> None: ...
|
||||
def newFrame(self) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type, exc_value, traceback): ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
|
||||
) -> Literal[False]: ...
|
||||
def tell(self): ...
|
||||
def seek(self, offset, whence=...): ...
|
||||
def goToEnd(self) -> None: ...
|
||||
|
@ -1,5 +1,6 @@
|
||||
import datetime
|
||||
import time
|
||||
from _typeshed import Unused
|
||||
from collections.abc import Callable, Mapping, Sequence
|
||||
from decimal import Decimal
|
||||
from typing import Any, TypeVar
|
||||
@ -25,7 +26,7 @@ def escape_time(obj: datetime.time, mapping: _EscaperMapping = ...) -> str: ...
|
||||
def escape_datetime(obj: datetime.datetime, mapping: _EscaperMapping = ...) -> str: ...
|
||||
def escape_date(obj: datetime.date, mapping: _EscaperMapping = ...) -> str: ...
|
||||
def escape_struct_time(obj: time.struct_time, mapping: _EscaperMapping = ...) -> str: ...
|
||||
def Decimal2Literal(o: Decimal, d: object) -> str: ...
|
||||
def Decimal2Literal(o: Decimal, d: Unused) -> str: ...
|
||||
def convert_datetime(obj: str | bytes) -> datetime.datetime | str: ...
|
||||
def convert_timedelta(obj: str | bytes) -> datetime.timedelta | str: ...
|
||||
def convert_time(obj: str | bytes) -> datetime.time | str: ...
|
||||
|
@ -1,11 +1,10 @@
|
||||
from _typeshed import Incomplete, StrOrBytesPath
|
||||
from _typeshed import Incomplete, StrOrBytesPath, Unused
|
||||
from collections.abc import Callable, Generator
|
||||
from typing import NamedTuple, SupportsFloat, TypeVar, overload
|
||||
from typing_extensions import Final, ParamSpec, SupportsIndex, TypeAlias
|
||||
|
||||
from PIL import Image
|
||||
|
||||
_Unused: TypeAlias = object
|
||||
_P = ParamSpec("_P")
|
||||
_R = TypeVar("_R")
|
||||
# TODO: cv2.Mat is not available as a type yet:
|
||||
@ -49,7 +48,7 @@ def locate(
|
||||
haystackImage: str | Image.Image | _Mat,
|
||||
*,
|
||||
grayscale: bool | None = None,
|
||||
limit: _Unused = 1,
|
||||
limit: Unused = 1,
|
||||
region: tuple[int, int, int, int] | None = None,
|
||||
step: int = 1,
|
||||
confidence: SupportsFloat | SupportsIndex | str = 0.999,
|
||||
@ -62,7 +61,7 @@ def locate(
|
||||
haystackImage: str | Image.Image,
|
||||
*,
|
||||
grayscale: bool | None = None,
|
||||
limit: _Unused = 1,
|
||||
limit: Unused = 1,
|
||||
region: tuple[int, int, int, int] | None = None,
|
||||
step: int = 1,
|
||||
confidence: None = None,
|
||||
@ -75,7 +74,7 @@ def locateOnScreen(
|
||||
minSearchTime: float = 0,
|
||||
*,
|
||||
grayscale: bool | None = None,
|
||||
limit: _Unused = 1,
|
||||
limit: Unused = 1,
|
||||
region: tuple[int, int, int, int] | None = None,
|
||||
step: int = 1,
|
||||
confidence: SupportsFloat | SupportsIndex | str = 0.999,
|
||||
@ -88,7 +87,7 @@ def locateOnScreen(
|
||||
minSearchTime: float = 0,
|
||||
*,
|
||||
grayscale: bool | None = None,
|
||||
limit: _Unused = 1,
|
||||
limit: Unused = 1,
|
||||
region: tuple[int, int, int, int] | None = None,
|
||||
step: int = 1,
|
||||
confidence: None = None,
|
||||
@ -125,7 +124,7 @@ def locateCenterOnScreen(
|
||||
*,
|
||||
minSearchTime: float,
|
||||
grayscale: bool | None = None,
|
||||
limit: _Unused = 1,
|
||||
limit: Unused = 1,
|
||||
region: tuple[int, int, int, int] | None = None,
|
||||
step: int = 1,
|
||||
confidence: SupportsFloat | SupportsIndex | str = 0.999,
|
||||
@ -138,7 +137,7 @@ def locateCenterOnScreen(
|
||||
*,
|
||||
minSearchTime: float,
|
||||
grayscale: bool | None = None,
|
||||
limit: _Unused = 1,
|
||||
limit: Unused = 1,
|
||||
region: tuple[int, int, int, int] | None = None,
|
||||
step: int = 1,
|
||||
confidence: None = None,
|
||||
@ -151,7 +150,7 @@ def locateOnWindow(
|
||||
title: str,
|
||||
*,
|
||||
grayscale: bool | None = None,
|
||||
limit: _Unused = 1,
|
||||
limit: Unused = 1,
|
||||
step: int = 1,
|
||||
confidence: SupportsFloat | SupportsIndex | str = 0.999,
|
||||
) -> Box | None: ...
|
||||
@ -163,7 +162,7 @@ def locateOnWindow(
|
||||
title: str,
|
||||
*,
|
||||
grayscale: bool | None = None,
|
||||
limit: _Unused = 1,
|
||||
limit: Unused = 1,
|
||||
step: int = 1,
|
||||
confidence: None = None,
|
||||
) -> Box | None: ...
|
||||
|
@ -2,4 +2,5 @@ version = "2.14.*"
|
||||
requires = ["types-docutils", "types-setuptools"]
|
||||
|
||||
[tool.stubtest]
|
||||
stubtest_requirements = ["sphinx"]
|
||||
ignore_missing_stub = true
|
||||
|
@ -6,4 +6,5 @@ extra_description = """\
|
||||
obsolete_since = "2.0.0" # Released on 2023-01-26
|
||||
|
||||
[tool.stubtest]
|
||||
stubtest_requirements = ["pytest"]
|
||||
ignore_missing_stub = true
|
||||
|
@ -1,4 +1,4 @@
|
||||
from _typeshed import SupportsItems
|
||||
from _typeshed import SupportsItems, Unused
|
||||
from collections.abc import Iterable, Mapping, Sequence
|
||||
from typing import Any, NamedTuple
|
||||
from typing_extensions import Self, TypeAlias
|
||||
@ -6,11 +6,14 @@ from typing_extensions import Self, TypeAlias
|
||||
from ..util import immutabledict
|
||||
from .interfaces import Dialect
|
||||
|
||||
# object that produces a password when called with str()
|
||||
_PasswordObject: TypeAlias = object
|
||||
|
||||
# stub-only helper class
|
||||
class _URLTuple(NamedTuple):
|
||||
drivername: str
|
||||
username: str | None
|
||||
password: str | object | None # object that produces a password when called with str()
|
||||
password: str | _PasswordObject | None
|
||||
host: str | None
|
||||
port: int | None
|
||||
database: str | None
|
||||
@ -24,7 +27,7 @@ class URL(_URLTuple):
|
||||
cls,
|
||||
drivername: str,
|
||||
username: str | None = ...,
|
||||
password: str | object | None = ..., # object that produces a password when called with str()
|
||||
password: str | _PasswordObject | None = None,
|
||||
host: str | None = ...,
|
||||
port: int | None = ...,
|
||||
database: str | None = ...,
|
||||
@ -34,7 +37,7 @@ class URL(_URLTuple):
|
||||
self,
|
||||
drivername: str | None = ...,
|
||||
username: str | None = ...,
|
||||
password: str | object | None = ...,
|
||||
password: str | _PasswordObject | None = None,
|
||||
host: str | None = ...,
|
||||
port: int | None = ...,
|
||||
database: str | None = ...,
|
||||
@ -49,7 +52,7 @@ class URL(_URLTuple):
|
||||
def __to_string__(self, hide_password: bool = ...) -> str: ...
|
||||
def render_as_string(self, hide_password: bool = ...) -> str: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
def __deepcopy__(self, memo: object) -> Self: ...
|
||||
def __deepcopy__(self, memo: Unused) -> Self: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
|
@ -1,4 +1,5 @@
|
||||
import abc
|
||||
from types import TracebackType
|
||||
|
||||
class ReversibleProxy: ...
|
||||
|
||||
@ -8,7 +9,9 @@ class StartableContext(abc.ABC, metaclass=abc.ABCMeta):
|
||||
def __await__(self): ...
|
||||
async def __aenter__(self): ...
|
||||
@abc.abstractmethod
|
||||
async def __aexit__(self, type_, value, traceback): ...
|
||||
async def __aexit__(
|
||||
self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
class ProxyComparable(ReversibleProxy):
|
||||
def __hash__(self) -> int: ...
|
||||
|
@ -1,4 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
|
||||
from .base import ProxyComparable, StartableContext
|
||||
@ -39,7 +40,9 @@ class AsyncConnection(ProxyComparable, StartableContext, AsyncConnectable):
|
||||
async def stream_scalars(self, statement, parameters: Incomplete | None = ..., execution_options=...): ...
|
||||
async def run_sync(self, fn, *arg, **kw): ...
|
||||
def __await__(self): ...
|
||||
async def __aexit__(self, type_, value, traceback) -> None: ...
|
||||
async def __aexit__(
|
||||
self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
# proxied from Connection
|
||||
dialect: Any
|
||||
@property
|
||||
@ -55,7 +58,9 @@ class AsyncEngine(ProxyComparable, AsyncConnectable):
|
||||
def __init__(self, conn) -> None: ...
|
||||
transaction: Any
|
||||
async def start(self, is_ctxmanager: bool = ...): ...
|
||||
async def __aexit__(self, type_, value, traceback) -> None: ...
|
||||
async def __aexit__(
|
||||
self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
sync_engine: Any
|
||||
def __init__(self, sync_engine) -> None: ...
|
||||
def begin(self): ...
|
||||
@ -91,4 +96,6 @@ class AsyncTransaction(ProxyComparable, StartableContext):
|
||||
async def rollback(self) -> None: ...
|
||||
async def commit(self) -> None: ...
|
||||
async def start(self, is_ctxmanager: bool = ...): ...
|
||||
async def __aexit__(self, type_, value, traceback) -> None: ...
|
||||
async def __aexit__(
|
||||
self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
@ -1,4 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
@ -55,7 +56,9 @@ class AsyncSession(ReversibleProxy):
|
||||
@classmethod
|
||||
async def close_all(cls): ...
|
||||
async def __aenter__(self) -> Self: ...
|
||||
async def __aexit__(self, type_, value, traceback) -> None: ...
|
||||
async def __aexit__(
|
||||
self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
# proxied from Session
|
||||
identity_map: Any
|
||||
autoflush: Any
|
||||
@ -92,7 +95,9 @@ class _AsyncSessionContextManager:
|
||||
def __init__(self, async_session) -> None: ...
|
||||
trans: Any
|
||||
async def __aenter__(self): ...
|
||||
async def __aexit__(self, type_, value, traceback) -> None: ...
|
||||
async def __aexit__(
|
||||
self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
class AsyncSessionTransaction(ReversibleProxy, StartableContext):
|
||||
session: Any
|
||||
@ -104,7 +109,9 @@ class AsyncSessionTransaction(ReversibleProxy, StartableContext):
|
||||
async def rollback(self) -> None: ...
|
||||
async def commit(self) -> None: ...
|
||||
async def start(self, is_ctxmanager: bool = ...): ...
|
||||
async def __aexit__(self, type_, value, traceback) -> None: ...
|
||||
async def __aexit__(
|
||||
self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
def async_object_session(instance): ...
|
||||
def async_session(session): ...
|
||||
|
@ -1,3 +1,4 @@
|
||||
from _typeshed import Unused
|
||||
from logging import Logger
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
@ -32,7 +33,7 @@ def instance_logger(instance: Identified, echoflag: _EchoFlag = ...) -> None: ..
|
||||
class echo_property:
|
||||
__doc__: str
|
||||
@overload
|
||||
def __get__(self, instance: None, owner: object) -> Self: ...
|
||||
def __get__(self, instance: None, owner: Unused) -> Self: ...
|
||||
@overload
|
||||
def __get__(self, instance: Identified, owner: object) -> _EchoFlag: ...
|
||||
def __get__(self, instance: Identified, owner: Unused) -> _EchoFlag: ...
|
||||
def __set__(self, instance: Identified, value: _EchoFlag) -> None: ...
|
||||
|
@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, Unused
|
||||
from collections.abc import Callable
|
||||
from typing import Any, ClassVar, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
@ -28,7 +28,7 @@ _DeclarativeBaseMeta: TypeAlias = Callable[[str, tuple[type[Any], ...], dict[str
|
||||
def has_inherited_table(cls: type[Any]) -> bool: ...
|
||||
|
||||
class DeclarativeMeta(type):
|
||||
def __init__(cls, classname: str, bases: tuple[type[Any], ...], dict_: dict[str, Any], **kw: object) -> None: ...
|
||||
def __init__(cls, classname: str, bases: tuple[type[Any], ...], dict_: dict[str, Any], **kw: Unused) -> None: ...
|
||||
def __setattr__(cls, key: str, value: Any) -> None: ...
|
||||
def __delattr__(cls, key: str) -> None: ...
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Mapping
|
||||
from types import TracebackType
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
@ -107,7 +108,9 @@ class Session(_SessionClassMethods):
|
||||
) -> None: ...
|
||||
connection_callable: Any
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, type_, value, traceback) -> None: ...
|
||||
def __exit__(
|
||||
self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
@property
|
||||
def transaction(self): ...
|
||||
def in_transaction(self): ...
|
||||
|
@ -1,5 +1,5 @@
|
||||
import collections.abc
|
||||
from _typeshed import Incomplete, SupportsKeysAndGetItem
|
||||
from _typeshed import Incomplete, SupportsKeysAndGetItem, Unused
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping
|
||||
from typing import Any, Generic, NoReturn, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
@ -16,9 +16,9 @@ collections_abc = collections.abc
|
||||
EMPTY_SET: frozenset[Any]
|
||||
|
||||
class ImmutableContainer:
|
||||
def __delitem__(self, *arg: object, **kw: object) -> NoReturn: ...
|
||||
def __setitem__(self, *arg: object, **kw: object) -> NoReturn: ...
|
||||
def __setattr__(self, *arg: object, **kw: object) -> NoReturn: ...
|
||||
def __delitem__(self, *arg: Unused, **kw: Unused) -> NoReturn: ...
|
||||
def __setitem__(self, *arg: Unused, **kw: Unused) -> NoReturn: ...
|
||||
def __setattr__(self, *arg: Unused, **kw: Unused) -> NoReturn: ...
|
||||
|
||||
@overload
|
||||
def coerce_to_immutabledict(d: None) -> immutabledict[Any, Any]: ...
|
||||
|
@ -1,3 +1,4 @@
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
|
||||
class _AsyncGeneratorContextManager:
|
||||
@ -5,6 +6,8 @@ class _AsyncGeneratorContextManager:
|
||||
__doc__: Any
|
||||
def __init__(self, func, args, kwds) -> None: ...
|
||||
async def __aenter__(self): ...
|
||||
async def __aexit__(self, typ, value, traceback): ...
|
||||
async def __aexit__(
|
||||
self, typ: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> bool | None: ...
|
||||
|
||||
def asynccontextmanager(func): ...
|
||||
|
@ -1,4 +1,5 @@
|
||||
import asyncio as asyncio
|
||||
from _typeshed import Unused
|
||||
from collections.abc import Callable, Coroutine
|
||||
from typing import Any
|
||||
|
||||
@ -13,6 +14,6 @@ class AsyncAdaptedLock:
|
||||
@memoized_property
|
||||
def mutex(self): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, *arg, **kw) -> None: ...
|
||||
def __exit__(self, *arg: Unused, **kw: Unused) -> None: ...
|
||||
|
||||
def get_event_loop(): ...
|
||||
|
@ -5,7 +5,7 @@ import itertools
|
||||
import operator
|
||||
import pickle as pickle
|
||||
import threading as threading
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, Unused
|
||||
from abc import ABC as ABC
|
||||
from datetime import timezone as timezone
|
||||
from functools import reduce as reduce
|
||||
@ -53,7 +53,7 @@ class nullcontext:
|
||||
enter_result: Any
|
||||
def __init__(self, enter_result: Incomplete | None = ...) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, *excinfo) -> None: ...
|
||||
def __exit__(self, *excinfo: Unused) -> None: ...
|
||||
|
||||
def inspect_getfullargspec(func): ...
|
||||
def importlib_metadata_get(group): ...
|
||||
|
@ -1,5 +1,6 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, Unused
|
||||
from collections.abc import Callable
|
||||
from types import TracebackType
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
@ -13,7 +14,9 @@ class safe_reraise:
|
||||
warn_only: Any
|
||||
def __init__(self, warn_only: bool = ...) -> None: ...
|
||||
def __enter__(self) -> None: ...
|
||||
def __exit__(self, type_, value, traceback) -> None: ...
|
||||
def __exit__(
|
||||
self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
def walk_subclasses(cls) -> None: ...
|
||||
def string_or_unprintable(element): ...
|
||||
@ -71,9 +74,9 @@ class memoized_property(Generic[_R]):
|
||||
__name__: str
|
||||
def __init__(self, fget: Callable[..., _R], doc: str | None = ...) -> None: ...
|
||||
@overload
|
||||
def __get__(self, obj: None, cls: object) -> Self: ...
|
||||
def __get__(self, obj: None, cls: Unused) -> Self: ...
|
||||
@overload
|
||||
def __get__(self, obj: object, cls: object) -> _R: ...
|
||||
def __get__(self, obj: object, cls: Unused) -> _R: ...
|
||||
@classmethod
|
||||
def reset(cls, obj: object, name: str) -> None: ...
|
||||
|
||||
@ -86,9 +89,9 @@ class HasMemoized:
|
||||
__name__: str
|
||||
def __init__(self, fget: Callable[..., _R], doc: str | None = ...) -> None: ...
|
||||
@overload
|
||||
def __get__(self, obj: None, cls: object) -> Self: ...
|
||||
def __get__(self, obj: None, cls: Unused) -> Self: ...
|
||||
@overload
|
||||
def __get__(self, obj: object, cls: object) -> _R: ...
|
||||
def __get__(self, obj: object, cls: Unused) -> _R: ...
|
||||
|
||||
@classmethod
|
||||
def memoized_instancemethod(cls, fn): ...
|
||||
|
@ -1,4 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from types import TracebackType
|
||||
|
||||
from .models.segment import SegmentContextManager as SegmentContextManager
|
||||
from .models.subsegment import (
|
||||
@ -11,12 +12,16 @@ from .utils import stacktrace as stacktrace
|
||||
|
||||
class AsyncSegmentContextManager(SegmentContextManager):
|
||||
async def __aenter__(self): ...
|
||||
async def __aexit__(self, exc_type, exc_val, exc_tb): ...
|
||||
async def __aexit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
class AsyncSubsegmentContextManager(SubsegmentContextManager):
|
||||
async def __call__(self, wrapped, instance, args, kwargs): ...
|
||||
async def __aenter__(self): ...
|
||||
async def __aexit__(self, exc_type, exc_val, exc_tb): ...
|
||||
async def __aexit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
class AsyncAWSXRayRecorder(AWSXRayRecorder):
|
||||
def capture_async(self, name: Incomplete | None = ...): ...
|
||||
|
@ -1,3 +1,4 @@
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
|
||||
from ..exceptions.exceptions import SegmentNameMissingException as SegmentNameMissingException
|
||||
@ -16,7 +17,9 @@ class SegmentContextManager:
|
||||
segment: Segment
|
||||
def __init__(self, recorder: AWSXRayRecorder, name: str | None = ..., **segment_kwargs) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type, exc_val, exc_tb) -> None: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
class Segment(Entity):
|
||||
trace_id: str | None
|
||||
|
@ -1,5 +1,6 @@
|
||||
import time
|
||||
from _typeshed import Incomplete
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
|
||||
from ...core import AWSXRayRecorder
|
||||
@ -21,7 +22,9 @@ class SubsegmentContextManager:
|
||||
def __init__(self, recorder: AWSXRayRecorder, name: Incomplete | None = ..., **subsegment_kwargs) -> None: ...
|
||||
def __call__(self, wrapped, instance, args: list[Any], kwargs: dict[str, Any]): ...
|
||||
def __enter__(self) -> Subsegment: ...
|
||||
def __exit__(self, exc_type, exc_val, exc_tb) -> None: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
class Subsegment(Entity):
|
||||
parent_segment: Segment
|
||||
|
@ -1,4 +1,4 @@
|
||||
from _typeshed import IdentityFunction
|
||||
from _typeshed import IdentityFunction, Unused
|
||||
from collections.abc import Callable, Iterator, MutableMapping, Sequence
|
||||
from contextlib import AbstractContextManager
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
@ -21,7 +21,7 @@ class Cache(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
def __missing__(self, key: _KT) -> _VT: ...
|
||||
def __iter__(self) -> Iterator[_KT]: ...
|
||||
def __len__(self) -> int: ...
|
||||
@overload # type: ignore[override]
|
||||
@overload
|
||||
def pop(self, key: _KT) -> _VT: ...
|
||||
@overload
|
||||
def pop(self, key: _KT, default: _VT | _T) -> _VT | _T: ...
|
||||
@ -66,7 +66,7 @@ class _TimedCache(Cache[_KT, _VT]):
|
||||
def __init__(self, timer: Callable[[], float]) -> None: ...
|
||||
def __call__(self) -> float: ...
|
||||
def __enter__(self) -> float: ...
|
||||
def __exit__(self, *exc: object) -> None: ...
|
||||
def __exit__(self, *exc: Unused) -> None: ...
|
||||
|
||||
@property
|
||||
def timer(self) -> _Timer: ...
|
||||
|
@ -1,7 +1,8 @@
|
||||
from _typeshed import Unused
|
||||
from collections.abc import Hashable
|
||||
|
||||
__all__ = ("hashkey", "methodkey", "typedkey")
|
||||
|
||||
def hashkey(*args: Hashable, **kwargs: Hashable) -> tuple[Hashable, ...]: ...
|
||||
def methodkey(self: object, *args: Hashable, **kwargs: Hashable) -> tuple[Hashable, ...]: ...
|
||||
def methodkey(self: Unused, *args: Hashable, **kwargs: Hashable) -> tuple[Hashable, ...]: ...
|
||||
def typedkey(*args: Hashable, **kwargs: Hashable) -> tuple[Hashable, ...]: ...
|
||||
|
@ -1,4 +1,5 @@
|
||||
from collections.abc import Iterable, Mapping
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import Self, TypeAlias
|
||||
from urllib.parse import ParseResult, SplitResult
|
||||
@ -50,7 +51,9 @@ class DAVClient:
|
||||
ssl_cert: str | tuple[str, str] | None = ...,
|
||||
) -> None: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, exc_type: object, exc_value: object, traceback: object) -> None: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
def principal(self, *, url: str | ParseResult | SplitResult | URL | None = ...) -> Principal: ...
|
||||
def calendar(
|
||||
self,
|
||||
|
@ -69,7 +69,7 @@ class _CDataBase:
|
||||
def __dir__(self): ...
|
||||
def __enter__(self): ...
|
||||
def __eq__(self, other): ...
|
||||
def __exit__(self, type, value, traceback): ...
|
||||
def __exit__(self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None): ...
|
||||
def __float__(self) -> float: ...
|
||||
def __ge__(self, other): ...
|
||||
def __getitem__(self, index): ...
|
||||
|
@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from _typeshed import ReadableBuffer
|
||||
from _typeshed import ReadableBuffer, Unused
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Iterator
|
||||
from re import Match, Pattern
|
||||
@ -121,7 +121,7 @@ class HashExpander:
|
||||
range_end: int | None = None,
|
||||
range_begin: int | None = None,
|
||||
) -> int: ...
|
||||
def match(self, efl: object, idx: object, expr: str, hash_id: object = None, **kw: object) -> Match[str] | None: ...
|
||||
def match(self, efl: Unused, idx: Unused, expr: str, hash_id: Unused = None, **kw: Unused) -> Match[str] | None: ...
|
||||
def expand(
|
||||
self,
|
||||
efl: object,
|
||||
|
@ -5,6 +5,7 @@ from _typeshed import (
|
||||
OpenTextModeReading,
|
||||
OpenTextModeWriting,
|
||||
SupportsWrite,
|
||||
Unused,
|
||||
)
|
||||
from re import Pattern
|
||||
from typing import Any, ClassVar
|
||||
@ -88,7 +89,7 @@ class NullInput(Input):
|
||||
|
||||
class NullOutput(Output):
|
||||
default_destination_path: ClassVar[str]
|
||||
def write(self, data: object) -> None: ...
|
||||
def write(self, data: Unused) -> None: ...
|
||||
|
||||
class DocTreeInput(Input):
|
||||
default_source_path: ClassVar[str]
|
||||
|
@ -1,2 +1,5 @@
|
||||
version = "2.6.1"
|
||||
requires = ["types-Pillow>=9.2.0"]
|
||||
|
||||
[tool.stubtest]
|
||||
stubtest_requirements = ["cryptography"]
|
||||
|
@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, Unused
|
||||
from collections.abc import Callable
|
||||
from html.parser import HTMLParser
|
||||
from logging import Logger
|
||||
@ -68,7 +68,7 @@ class HTML2FPDF(HTMLParser):
|
||||
ul_bullet_char: str = ...,
|
||||
heading_sizes: Incomplete | None = None,
|
||||
warn_on_tags_not_matching: bool = True,
|
||||
**_: object,
|
||||
**_: Unused,
|
||||
): ...
|
||||
def width2unit(self, length): ...
|
||||
def handle_data(self, data) -> None: ...
|
||||
|
@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, Unused
|
||||
from collections import defaultdict
|
||||
from logging import Logger
|
||||
from typing_extensions import Final
|
||||
@ -165,7 +165,7 @@ class PDFPagesRoot(PDFObject):
|
||||
|
||||
class PDFExtGState(PDFObject):
|
||||
def __init__(self, dict_as_str) -> None: ...
|
||||
def serialize(self, obj_dict: object = None, _security_handler: StandardSecurityHandler | None = None) -> str: ...
|
||||
def serialize(self, obj_dict: Unused = None, _security_handler: StandardSecurityHandler | None = None) -> str: ...
|
||||
|
||||
class PDFXrefAndTrailer(ContentWithoutID):
|
||||
output_builder: Incomplete
|
||||
|
@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, Unused
|
||||
from collections import defaultdict
|
||||
from collections.abc import Generator, Iterable
|
||||
|
||||
@ -8,7 +8,7 @@ from .syntax import PDFArray, PDFObject, PDFString
|
||||
class NumberTree(PDFObject):
|
||||
nums: defaultdict[Incomplete, list[Incomplete]]
|
||||
def __init__(self) -> None: ...
|
||||
def serialize(self, obj_dict: object = ..., _security_handler: StandardSecurityHandler | None = None) -> str: ...
|
||||
def serialize(self, obj_dict: Unused = None, _security_handler: StandardSecurityHandler | None = None) -> str: ...
|
||||
|
||||
class StructTreeRoot(PDFObject):
|
||||
type: str
|
||||
|
@ -1,4 +1,5 @@
|
||||
version = "2.1.*"
|
||||
|
||||
[tool.stubtest]
|
||||
stubtest_requirements = ["protobuf==3.20.2"]
|
||||
ignore_missing_stub = true
|
||||
|
@ -1,4 +1,5 @@
|
||||
import datetime
|
||||
from _typeshed import Unused
|
||||
from collections.abc import Callable, Iterable, Sequence
|
||||
from typing import Any, NoReturn
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
@ -77,7 +78,7 @@ class Property(ModelAttribute):
|
||||
indexed: bool | None = ...,
|
||||
repeated: bool | None = ...,
|
||||
required: bool | None = ...,
|
||||
default: object | None = ...,
|
||||
default: object = None,
|
||||
choices: Iterable[object] | None = ...,
|
||||
validator: Callable[[Property, Any], object] | None = ...,
|
||||
verbose_name: str | None = ...,
|
||||
@ -153,7 +154,7 @@ class JsonProperty(BlobProperty):
|
||||
indexed: bool | None = ...,
|
||||
repeated: bool | None = ...,
|
||||
required: bool | None = ...,
|
||||
default: object | None = ...,
|
||||
default: object = None,
|
||||
choices: Iterable[object] | None = ...,
|
||||
validator: Callable[[Property, Any], object] | None = ...,
|
||||
verbose_name: str | None = ...,
|
||||
@ -423,7 +424,7 @@ def get_multi_async(
|
||||
memcache_timeout: int | None = ...,
|
||||
max_memcache_items: int | None = ...,
|
||||
force_writes: bool | None = ...,
|
||||
_options: object | None = ...,
|
||||
_options: object = None,
|
||||
) -> list[type[tasklets_module.Future]]: ...
|
||||
def get_multi(
|
||||
keys: Sequence[type[key_module.Key]],
|
||||
@ -441,7 +442,7 @@ def get_multi(
|
||||
memcache_timeout: int | None = ...,
|
||||
max_memcache_items: int | None = ...,
|
||||
force_writes: bool | None = ...,
|
||||
_options: object | None = ...,
|
||||
_options: object = None,
|
||||
) -> list[type[Model] | None]: ...
|
||||
def put_multi_async(
|
||||
entities: list[type[Model]],
|
||||
@ -456,7 +457,7 @@ def put_multi_async(
|
||||
memcache_timeout: int | None = ...,
|
||||
max_memcache_items: int | None = ...,
|
||||
force_writes: bool | None = ...,
|
||||
_options: object | None = ...,
|
||||
_options: object = None,
|
||||
) -> list[tasklets_module.Future]: ...
|
||||
def put_multi(
|
||||
entities: list[Model],
|
||||
@ -471,7 +472,7 @@ def put_multi(
|
||||
memcache_timeout: int | None = ...,
|
||||
max_memcache_items: int | None = ...,
|
||||
force_writes: bool | None = ...,
|
||||
_options: object | None = ...,
|
||||
_options: object = None,
|
||||
) -> list[key_module.Key]: ...
|
||||
def delete_multi_async(
|
||||
keys: list[key_module.Key],
|
||||
@ -486,7 +487,7 @@ def delete_multi_async(
|
||||
memcache_timeout: int | None = ...,
|
||||
max_memcache_items: int | None = ...,
|
||||
force_writes: bool | None = ...,
|
||||
_options: object | None = ...,
|
||||
_options: object = None,
|
||||
) -> list[tasklets_module.Future]: ...
|
||||
def delete_multi(
|
||||
keys: Sequence[key_module.Key],
|
||||
@ -501,7 +502,7 @@ def delete_multi(
|
||||
memcache_timeout: int | None = ...,
|
||||
max_memcache_items: int | None = ...,
|
||||
force_writes: bool | None = ...,
|
||||
_options: object | None = ...,
|
||||
_options: object = None,
|
||||
) -> list[None]: ...
|
||||
def get_indexes_async(**options: object) -> NoReturn: ...
|
||||
def get_indexes(**options: object) -> NoReturn: ...
|
||||
def get_indexes_async(**options: Unused) -> NoReturn: ...
|
||||
def get_indexes(**options: Unused) -> NoReturn: ...
|
||||
|
@ -1 +1,4 @@
|
||||
version = "10.0.*"
|
||||
|
||||
[tool.stubtest]
|
||||
stubtest_requirements = ["docutils", "mock"]
|
||||
|
@ -65,7 +65,7 @@ class MockedProgram(CustomSearchPath):
|
||||
program_signal_file: Any
|
||||
def __init__(self, name, returncode: int = ..., script: Incomplete | None = ...) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, *args, **kw): ...
|
||||
def __exit__(self, *args: object, **kw: object): ...
|
||||
|
||||
class CaptureOutput(ContextManager):
|
||||
stdin: Any
|
||||
|
@ -3,3 +3,4 @@ requires = ["types-urllib3"]
|
||||
|
||||
[tool.stubtest]
|
||||
extras = ["extra"]
|
||||
stubtest_requirements = ["aiohttp"]
|
||||
|
@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from enum import Enum
|
||||
from types import TracebackType
|
||||
from typing_extensions import Self
|
||||
|
||||
from influxdb_client.client.flux_table import TableList
|
||||
@ -46,9 +47,13 @@ class FluxCsvParser:
|
||||
response_metadata_mode: FluxResponseMetadataMode = ...,
|
||||
) -> None: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, exc_type, exc_val, exc_tb) -> None: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
async def __aenter__(self) -> Self: ...
|
||||
async def __aexit__(self, exc_type, exc_val, exc_tb) -> None: ...
|
||||
async def __aexit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
def generator(self) -> Generator[Incomplete, None, None]: ...
|
||||
def generator_async(self): ...
|
||||
def parse_record(self, table_index, table, csv): ...
|
||||
|
@ -1,4 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from types import TracebackType
|
||||
from typing_extensions import Self
|
||||
|
||||
from influxdb_client import HealthCheck, InvokableScriptsApi, Ready
|
||||
@ -43,7 +44,9 @@ class InfluxDBClient(_BaseClient):
|
||||
profilers: Incomplete | None = ...,
|
||||
) -> None: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, exc_type: object, exc_value: object, traceback: object) -> None: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def from_config_file(cls, config_file: str = ..., debug: Incomplete | None = ..., enable_gzip: bool = ..., **kwargs): ...
|
||||
@classmethod
|
||||
|
@ -1,4 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from types import TracebackType
|
||||
from typing_extensions import Self
|
||||
|
||||
from influxdb_client.client._base import _BaseClient
|
||||
@ -37,7 +38,9 @@ class InfluxDBClientAsync(_BaseClient):
|
||||
profilers: Incomplete | None = ...,
|
||||
) -> None: ...
|
||||
async def __aenter__(self) -> Self: ...
|
||||
async def __aexit__(self, exc_type: object, exc: object, tb: object) -> None: ...
|
||||
async def __aexit__(
|
||||
self, exc_type: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None
|
||||
) -> None: ...
|
||||
async def close(self) -> None: ...
|
||||
@classmethod
|
||||
def from_config_file(cls, config_file: str = ..., debug: Incomplete | None = ..., enable_gzip: bool = ..., **kwargs): ...
|
||||
|
@ -1,5 +1,6 @@
|
||||
import multiprocessing
|
||||
from _typeshed import Incomplete
|
||||
from types import TracebackType
|
||||
|
||||
logger: Incomplete
|
||||
|
||||
@ -18,5 +19,7 @@ class MultiprocessingWriter(multiprocessing.Process):
|
||||
def start(self) -> None: ...
|
||||
def terminate(self) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type, exc_value, traceback) -> None: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
def __del__(self) -> None: ...
|
||||
|
@ -1,8 +1,10 @@
|
||||
import logging
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
from enum import Enum
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
from influxdb_client.client._base import _BaseWriteApi
|
||||
from influxdb_client.client.write.point import Point
|
||||
@ -12,7 +14,7 @@ _DataClass: TypeAlias = Any # any dataclass
|
||||
_NamedTuple: TypeAlias = tuple[Any, ...] # any NamedTuple
|
||||
_Observable: TypeAlias = Any # reactivex.Observable
|
||||
|
||||
logger: Incomplete
|
||||
logger: logging.Logger
|
||||
|
||||
class WriteType(Enum):
|
||||
batching: int
|
||||
@ -20,27 +22,29 @@ class WriteType(Enum):
|
||||
synchronous: int
|
||||
|
||||
class WriteOptions:
|
||||
write_type: Incomplete
|
||||
batch_size: Incomplete
|
||||
flush_interval: Incomplete
|
||||
jitter_interval: Incomplete
|
||||
retry_interval: Incomplete
|
||||
max_retries: Incomplete
|
||||
max_retry_delay: Incomplete
|
||||
max_retry_time: Incomplete
|
||||
exponential_base: Incomplete
|
||||
write_type: WriteType
|
||||
batch_size: int
|
||||
flush_interval: int
|
||||
jitter_interval: int
|
||||
retry_interval: int
|
||||
max_retries: int
|
||||
max_retry_delay: int
|
||||
max_retry_time: int
|
||||
exponential_base: int
|
||||
write_scheduler: Incomplete
|
||||
max_close_wait: int
|
||||
def __init__(
|
||||
self,
|
||||
write_type: WriteType = ...,
|
||||
batch_size: int = ...,
|
||||
flush_interval: int = ...,
|
||||
jitter_interval: int = ...,
|
||||
retry_interval: int = ...,
|
||||
max_retries: int = ...,
|
||||
max_retry_delay: int = ...,
|
||||
max_retry_time: int = ...,
|
||||
exponential_base: int = ...,
|
||||
batch_size: int = 1_000,
|
||||
flush_interval: int = 1_000,
|
||||
jitter_interval: int = 0,
|
||||
retry_interval: int = 5_000,
|
||||
max_retries: int = 5,
|
||||
max_retry_delay: int = 125_000,
|
||||
max_retry_time: int = 180_000,
|
||||
exponential_base: int = 2,
|
||||
max_close_wait: int = 300_000,
|
||||
write_scheduler=...,
|
||||
) -> None: ...
|
||||
def to_retry_strategy(self, **kwargs): ...
|
||||
@ -99,6 +103,8 @@ class WriteApi(_BaseWriteApi):
|
||||
) -> Any: ...
|
||||
def flush(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type, exc_val, exc_tb) -> None: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
def __del__(self) -> None: ...
|
||||
|
@ -1,4 +1,5 @@
|
||||
from collections.abc import Iterable, Mapping
|
||||
from types import TracebackType
|
||||
from typing import Any, TextIO, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
|
||||
@ -194,7 +195,9 @@ class Promise(Result):
|
||||
def __init__(self, runner) -> None: ...
|
||||
def join(self): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type, exc_value, traceback) -> None: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
def normalize_hide(val, out_stream=..., err_stream=...): ...
|
||||
def default_encoding() -> str: ...
|
||||
|
@ -7,3 +7,4 @@ apt_dependencies = ["libkrb5-dev"]
|
||||
# No need to install on the CI. Leaving here as information for MacOs/Windows contributors.
|
||||
# brew_dependencies = ["krb5"]
|
||||
# choco_dependencies = ["mitkerberos"]
|
||||
stubtest_requirements = ["gssapi"]
|
||||
|
@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete, IndexableBuffer, SliceableBuffer
|
||||
from _typeshed import Incomplete, IndexableBuffer, SliceableBuffer, Unused
|
||||
from collections.abc import Callable, Mapping
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Final, TypeAlias
|
||||
@ -7,7 +7,6 @@ from pyasn1.codec.ber.encoder import AbstractItemEncoder
|
||||
|
||||
# Use _typeshed._SupportsGetItemBuffer after PEP 688
|
||||
_SupportsGetItemBuffer: TypeAlias = SliceableBuffer | IndexableBuffer
|
||||
_Unused: TypeAlias = object
|
||||
_R = TypeVar("_R")
|
||||
_B = TypeVar("_B", bound=_SupportsGetItemBuffer)
|
||||
# The possible return type is a union of all other decode methods, ie: AnyOf[Incomplete | bool]
|
||||
@ -18,7 +17,7 @@ CLASSES: Final[dict[tuple[bool, bool], int]]
|
||||
class LDAPBooleanEncoder(AbstractItemEncoder):
|
||||
supportIndefLenMode: bool
|
||||
# Requires pyasn1 > 0.3.7
|
||||
def encodeValue(self, value: bool | int, asn1Spec: _Unused, encodeFun: _Unused, **options: _Unused): ...
|
||||
def encodeValue(self, value: bool | int, asn1Spec: Unused, encodeFun: Unused, **options: Unused): ...
|
||||
|
||||
def compute_ber_size(data): ...
|
||||
def decode_message_fast(message): ...
|
||||
@ -28,13 +27,13 @@ def decode_sequence(message: _B, start: int, stop: int, context_decoders: Mappin
|
||||
def decode_sequence(
|
||||
message: _SupportsGetItemBuffer, start: int, stop: int, context_decoders: None = ...
|
||||
) -> _AllDecodersReturnType: ...
|
||||
def decode_integer(message, start: int, stop: int, context_decoders: _Unused = ...): ...
|
||||
def decode_octet_string(message, start: int, stop: int, context_decoders: _Unused = ...): ...
|
||||
def decode_boolean(message, start: int, stop: int, context_decoders: _Unused = ...): ...
|
||||
def decode_bind_response(message, start: int, stop: int, context_decoders: _Unused = ...): ...
|
||||
def decode_extended_response(message, start: int, stop: int, context_decoders: _Unused = ...): ...
|
||||
def decode_intermediate_response(message, start: int, stop: int, context_decoders: _Unused = ...): ...
|
||||
def decode_controls(message, start: int, stop: int, context_decoders: _Unused = ...): ...
|
||||
def decode_integer(message, start: int, stop: int, context_decoders: Unused = ...): ...
|
||||
def decode_octet_string(message, start: int, stop: int, context_decoders: Unused = ...): ...
|
||||
def decode_boolean(message, start: int, stop: int, context_decoders: Unused = ...): ...
|
||||
def decode_bind_response(message, start: int, stop: int, context_decoders: Unused = ...): ...
|
||||
def decode_extended_response(message, start: int, stop: int, context_decoders: Unused = ...): ...
|
||||
def decode_intermediate_response(message, start: int, stop: int, context_decoders: Unused = ...): ...
|
||||
def decode_controls(message, start: int, stop: int, context_decoders: Unused = ...): ...
|
||||
def ldap_result_to_dict_fast(response): ...
|
||||
def get_byte(x): ...
|
||||
def get_bytes(x): ...
|
||||
|
@ -1,7 +1,7 @@
|
||||
import abc
|
||||
import sys
|
||||
from _collections_abc import dict_items, dict_keys, dict_values
|
||||
from _typeshed import IdentityFunction
|
||||
from _typeshed import IdentityFunction, Unused
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, ClassVar, Generic, TypeVar, overload, type_check_only
|
||||
from typing_extensions import Never, Self
|
||||
@ -65,7 +65,7 @@ class NoReturn: ...
|
||||
# a class decorator, but mypy does not support type[_T] for abstract
|
||||
# classes until this issue is resolved, https://github.com/python/mypy/issues/4717.
|
||||
def trait(cls: _T) -> _T: ...
|
||||
def mypyc_attr(*attrs: str, **kwattrs: object) -> IdentityFunction: ...
|
||||
def mypyc_attr(*attrs: str, **kwattrs: Unused) -> IdentityFunction: ...
|
||||
|
||||
class FlexibleAlias(Generic[_T, _U]): ...
|
||||
|
||||
|
@ -29,7 +29,7 @@ class BaseCursor:
|
||||
def __init__(self, connection) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, *exc_info) -> None: ...
|
||||
def __exit__(self, *exc_info: object) -> None: ...
|
||||
def nextset(self): ...
|
||||
def setinputsizes(self, *args) -> None: ...
|
||||
def setoutputsizes(self, *args) -> None: ...
|
||||
|
@ -1,3 +1,4 @@
|
||||
from _typeshed import Unused
|
||||
from datetime import date, datetime, time, timedelta
|
||||
|
||||
from MySQLdb._mysql import string_literal as string_literal
|
||||
@ -22,5 +23,5 @@ def DateTime_or_None(s: str) -> datetime | None: ...
|
||||
def TimeDelta_or_None(s: str) -> timedelta | None: ...
|
||||
def Time_or_None(s: str) -> time | None: ...
|
||||
def Date_or_None(s: str) -> date | None: ...
|
||||
def DateTime2literal(d: datetime, c: object) -> str: ...
|
||||
def DateTimeDelta2literal(d: datetime, c: object) -> str: ...
|
||||
def DateTime2literal(d: datetime, c: Unused) -> str: ...
|
||||
def DateTimeDelta2literal(d: datetime, c: Unused) -> str: ...
|
||||
|
@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, Unused
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import SupportsInt, overload
|
||||
@ -133,7 +133,7 @@ class IPNetwork(BaseIP, IPListMixin):
|
||||
def previous(self, step: int = ...) -> Self: ...
|
||||
def next(self, step: int = ...) -> Self: ...
|
||||
def supernet(self, prefixlen: int = ...) -> list[IPNetwork]: ...
|
||||
def subnet(self, prefixlen: int, count: int | None = ..., fmt: object | None = ...) -> Iterator[Self]: ...
|
||||
def subnet(self, prefixlen: int, count: int | None = ..., fmt: Unused = None) -> Iterator[Self]: ...
|
||||
def iter_hosts(self) -> Iterator[IPAddress]: ...
|
||||
|
||||
class IPRange(BaseIP, IPListMixin):
|
||||
|
@ -1,3 +1,4 @@
|
||||
from _typeshed import Unused
|
||||
from collections.abc import Iterable, Sequence
|
||||
from socket import AddressFamily
|
||||
from typing_extensions import Literal
|
||||
@ -22,7 +23,7 @@ hostmask_to_prefix: dict[int, int]
|
||||
|
||||
def valid_str(addr: str, flags: int = ...) -> bool: ...
|
||||
def str_to_int(addr: str, flags: int = ...) -> int: ...
|
||||
def int_to_str(int_val: int, dialect: object | None = ...) -> str: ...
|
||||
def int_to_str(int_val: int, dialect: Unused = None) -> str: ...
|
||||
def int_to_arpa(int_val: int) -> str: ...
|
||||
def int_to_packed(int_val: int) -> bytes: ...
|
||||
def packed_to_int(packed_int: bytes) -> int: ...
|
||||
|
@ -4,4 +4,4 @@ from .base import Client as Client
|
||||
|
||||
class BackendApplicationClient(Client):
|
||||
grant_type: str
|
||||
def prepare_request_body(self, body: str = ..., scope: Incomplete | None = ..., include_client_id: bool = ..., **kwargs): ... # type: ignore[override]
|
||||
def prepare_request_body(self, body: str = ..., scope: Incomplete | None = ..., include_client_id: bool = ..., **kwargs): ...
|
||||
|
@ -5,6 +5,6 @@ from .base import Client as Client
|
||||
class LegacyApplicationClient(Client):
|
||||
grant_type: str
|
||||
def __init__(self, client_id, **kwargs) -> None: ...
|
||||
def prepare_request_body( # type: ignore[override]
|
||||
def prepare_request_body(
|
||||
self, username, password, body: str = ..., scope: Incomplete | None = ..., include_client_id: bool = ..., **kwargs
|
||||
): ...
|
||||
|
@ -5,8 +5,8 @@ from .base import Client as Client
|
||||
|
||||
class MobileApplicationClient(Client):
|
||||
response_type: str
|
||||
def prepare_request_uri( # type: ignore[override]
|
||||
def prepare_request_uri(
|
||||
self, uri, redirect_uri: Incomplete | None = ..., scope: Incomplete | None = ..., state: Incomplete | None = ..., **kwargs
|
||||
): ...
|
||||
token: Any
|
||||
def parse_request_uri_response(self, uri, state: Incomplete | None = ..., scope: Incomplete | None = ...): ... # type: ignore[override]
|
||||
def parse_request_uri_response(self, uri, state: Incomplete | None = ..., scope: Incomplete | None = ...): ...
|
||||
|
@ -18,7 +18,7 @@ class ServiceApplicationClient(Client):
|
||||
audience: Incomplete | None = ...,
|
||||
**kwargs,
|
||||
) -> None: ...
|
||||
def prepare_request_body( # type: ignore[override]
|
||||
def prepare_request_body(
|
||||
self,
|
||||
private_key: Incomplete | None = ...,
|
||||
subject: Incomplete | None = ...,
|
||||
|
@ -7,7 +7,7 @@ class WebApplicationClient(Client):
|
||||
grant_type: str
|
||||
code: Any
|
||||
def __init__(self, client_id, code: Incomplete | None = ..., **kwargs) -> None: ...
|
||||
def prepare_request_uri( # type: ignore[override]
|
||||
def prepare_request_uri(
|
||||
self,
|
||||
uri,
|
||||
redirect_uri: Incomplete | None = ...,
|
||||
@ -17,7 +17,7 @@ class WebApplicationClient(Client):
|
||||
code_challenge_method: str | None = ...,
|
||||
**kwargs,
|
||||
): ...
|
||||
def prepare_request_body( # type: ignore[override]
|
||||
def prepare_request_body(
|
||||
self,
|
||||
code: Incomplete | None = ...,
|
||||
redirect_uri: Incomplete | None = ...,
|
||||
@ -26,4 +26,4 @@ class WebApplicationClient(Client):
|
||||
code_verifier: str | None = ...,
|
||||
**kwargs,
|
||||
): ...
|
||||
def parse_request_uri_response(self, uri, state: Incomplete | None = ...): ... # type: ignore[override]
|
||||
def parse_request_uri_response(self, uri, state: Incomplete | None = ...): ...
|
||||
|
@ -1,6 +1,11 @@
|
||||
from _typeshed import Incomplete
|
||||
from datetime import datetime
|
||||
|
||||
from openpyxl.comments.comments import Comment
|
||||
from openpyxl.styles.cell_style import StyleArray
|
||||
from openpyxl.styles.styleable import StyleableObject
|
||||
from openpyxl.worksheet.hyperlink import Hyperlink
|
||||
from openpyxl.worksheet.worksheet import Worksheet
|
||||
|
||||
__docformat__: str
|
||||
TIME_TYPES: Incomplete
|
||||
@ -19,60 +24,60 @@ TYPE_ERROR: str
|
||||
TYPE_FORMULA_CACHE_STRING: str
|
||||
VALID_TYPES: Incomplete
|
||||
|
||||
def get_type(t, value): ...
|
||||
def get_time_format(t): ...
|
||||
def get_type(t: type, value: object) -> str | None: ...
|
||||
def get_time_format(t: datetime) -> str: ...
|
||||
|
||||
class Cell(StyleableObject):
|
||||
row: Incomplete
|
||||
column: Incomplete
|
||||
row: int
|
||||
column: int
|
||||
data_type: str
|
||||
def __init__(
|
||||
self,
|
||||
worksheet,
|
||||
row: Incomplete | None = ...,
|
||||
column: Incomplete | None = ...,
|
||||
value: Incomplete | None = ...,
|
||||
style_array: Incomplete | None = ...,
|
||||
worksheet: Worksheet,
|
||||
row: int | None = ...,
|
||||
column: int | None = ...,
|
||||
value: str | float | datetime | None = ...,
|
||||
style_array: StyleArray | None = ...,
|
||||
) -> None: ...
|
||||
@property
|
||||
def coordinate(self): ...
|
||||
def coordinate(self) -> str: ...
|
||||
@property
|
||||
def col_idx(self): ...
|
||||
def col_idx(self) -> int: ...
|
||||
@property
|
||||
def column_letter(self): ...
|
||||
def column_letter(self) -> str: ...
|
||||
@property
|
||||
def encoding(self): ...
|
||||
def encoding(self) -> str: ...
|
||||
@property
|
||||
def base_date(self): ...
|
||||
def check_string(self, value): ...
|
||||
def check_error(self, value): ...
|
||||
def base_date(self) -> datetime: ...
|
||||
def check_string(self, value: str): ...
|
||||
def check_error(self, value: object) -> str: ...
|
||||
@property
|
||||
def value(self): ...
|
||||
def value(self) -> str | float | datetime | None: ...
|
||||
@value.setter
|
||||
def value(self, value) -> None: ...
|
||||
def value(self, value: str | float | datetime | None) -> None: ...
|
||||
@property
|
||||
def internal_value(self): ...
|
||||
def internal_value(self) -> str | float | datetime | None: ...
|
||||
@property
|
||||
def hyperlink(self): ...
|
||||
def hyperlink(self) -> Hyperlink | None: ...
|
||||
@hyperlink.setter
|
||||
def hyperlink(self, val) -> None: ...
|
||||
def hyperlink(self, val: Hyperlink | str | None) -> None: ...
|
||||
@property
|
||||
def is_date(self): ...
|
||||
def offset(self, row: int = ..., column: int = ...): ...
|
||||
def is_date(self) -> bool: ...
|
||||
def offset(self, row: int = ..., column: int = ...) -> Cell: ...
|
||||
@property
|
||||
def comment(self): ...
|
||||
def comment(self) -> Comment | None: ...
|
||||
@comment.setter
|
||||
def comment(self, value) -> None: ...
|
||||
def comment(self, value: Comment | None) -> None: ...
|
||||
|
||||
class MergedCell(StyleableObject):
|
||||
data_type: str
|
||||
comment: Incomplete
|
||||
hyperlink: Incomplete
|
||||
row: Incomplete
|
||||
column: Incomplete
|
||||
def __init__(self, worksheet, row: Incomplete | None = ..., column: Incomplete | None = ...) -> None: ...
|
||||
comment: Comment | None
|
||||
hyperlink: Hyperlink | None
|
||||
row: int
|
||||
column: int
|
||||
def __init__(self, worksheet: Worksheet, row: int | None = ..., column: int | None = ...) -> None: ...
|
||||
@property
|
||||
def coordinate(self): ...
|
||||
value: Incomplete
|
||||
def coordinate(self) -> str: ...
|
||||
value: str | float | int | datetime | None
|
||||
|
||||
def WriteOnlyCell(ws: Incomplete | None = ..., value: Incomplete | None = ...): ...
|
||||
def WriteOnlyCell(ws: Worksheet | None = ..., value: str | float | datetime | None = ...) -> Cell: ...
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user