Updated typeshed stubs to the latest version.

This commit is contained in:
Eric Traut 2023-02-26 08:37:41 -07:00
parent 5e96c7bb73
commit 90e70c3786
205 changed files with 2529 additions and 2918 deletions

View File

@ -1 +1 @@
880c0da4045cd5ff2c29b73429629adf27e49d50 9c4bfd5d11b47677e128452baa8ac7eeb1903a8e

View File

@ -1,6 +1,6 @@
import sys import sys
from _typeshed import SupportsRichComparisonT from _typeshed import SupportsLenAndGetItem, SupportsRichComparisonT
from collections.abc import Callable, MutableSequence, Sequence from collections.abc import Callable, MutableSequence
from typing import TypeVar, overload from typing import TypeVar, overload
_T = TypeVar("_T") _T = TypeVar("_T")
@ -8,11 +8,16 @@ _T = TypeVar("_T")
if sys.version_info >= (3, 10): if sys.version_info >= (3, 10):
@overload @overload
def bisect_left( 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: ... ) -> int: ...
@overload @overload
def bisect_left( def bisect_left(
a: Sequence[_T], a: SupportsLenAndGetItem[_T],
x: SupportsRichComparisonT, x: SupportsRichComparisonT,
lo: int = 0, lo: int = 0,
hi: int | None = None, hi: int | None = None,
@ -21,11 +26,16 @@ if sys.version_info >= (3, 10):
) -> int: ... ) -> int: ...
@overload @overload
def bisect_right( 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: ... ) -> int: ...
@overload @overload
def bisect_right( def bisect_right(
a: Sequence[_T], a: SupportsLenAndGetItem[_T],
x: SupportsRichComparisonT, x: SupportsRichComparisonT,
lo: int = 0, lo: int = 0,
hi: int | None = None, hi: int | None = None,
@ -61,10 +71,10 @@ if sys.version_info >= (3, 10):
else: else:
def bisect_left( 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: ... ) -> int: ...
def bisect_right( 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: ... ) -> int: ...
def insort_left( def insort_left(
a: MutableSequence[SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, hi: int | None = None a: MutableSequence[SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, hi: int | None = None

View File

@ -43,42 +43,42 @@ class _writer:
def writer( def writer(
csvfile: SupportsWrite[str], csvfile: SupportsWrite[str],
dialect: _DialectLike = ..., dialect: _DialectLike = "excel",
*, *,
delimiter: str = ..., delimiter: str = ",",
quotechar: str | None = ..., quotechar: str | None = '"',
escapechar: str | None = ..., escapechar: str | None = None,
doublequote: bool = ..., doublequote: bool = True,
skipinitialspace: bool = ..., skipinitialspace: bool = False,
lineterminator: str = ..., lineterminator: str = "\r\n",
quoting: _QuotingType = ..., quoting: _QuotingType = 0,
strict: bool = ..., strict: bool = False,
) -> _writer: ... ) -> _writer: ...
def reader( def reader(
csvfile: Iterable[str], csvfile: Iterable[str],
dialect: _DialectLike = ..., dialect: _DialectLike = "excel",
*, *,
delimiter: str = ..., delimiter: str = ",",
quotechar: str | None = ..., quotechar: str | None = '"',
escapechar: str | None = ..., escapechar: str | None = None,
doublequote: bool = ..., doublequote: bool = True,
skipinitialspace: bool = ..., skipinitialspace: bool = False,
lineterminator: str = ..., lineterminator: str = "\r\n",
quoting: _QuotingType = ..., quoting: _QuotingType = 0,
strict: bool = ..., strict: bool = False,
) -> _reader: ... ) -> _reader: ...
def register_dialect( def register_dialect(
name: str, name: str,
dialect: Any = ..., dialect: type[Dialect] = ...,
*, *,
delimiter: str = ..., delimiter: str = ",",
quotechar: str | None = ..., quotechar: str | None = '"',
escapechar: str | None = ..., escapechar: str | None = None,
doublequote: bool = ..., doublequote: bool = True,
skipinitialspace: bool = ..., skipinitialspace: bool = False,
lineterminator: str = ..., lineterminator: str = "\r\n",
quoting: _QuotingType = ..., quoting: _QuotingType = 0,
strict: bool = ..., strict: bool = False,
) -> None: ... ) -> None: ...
def unregister_dialect(name: str) -> None: ... def unregister_dialect(name: str) -> None: ...
def get_dialect(name: str) -> Dialect: ... def get_dialect(name: str) -> Dialect: ...

View File

@ -293,7 +293,7 @@ class structseq(Generic[_T_co]):
# https://github.com/python/typeshed/pull/6560#discussion_r767149830 # https://github.com/python/typeshed/pull/6560#discussion_r767149830
def __new__(cls: type[Self], sequence: Iterable[_T_co], dict: dict[str, Any] = ...) -> Self: ... 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 AnyOrLiteralStr = TypeVar("AnyOrLiteralStr", str, bytes, LiteralString) # noqa: Y001
# Represents when str or LiteralStr is acceptable. Useful for string processing # Represents when str or LiteralStr is acceptable. Useful for string processing

View File

@ -161,17 +161,12 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
add_help: bool = True, add_help: bool = True,
allow_abbrev: bool = True, allow_abbrev: bool = True,
) -> None: ... ) -> None: ...
# The type-ignores in these overloads should be temporary. See: # Ignore errors about overlapping overloads
# https://github.com/python/typeshed/pull/2643#issuecomment-442280277
@overload @overload
def parse_args(self, args: Sequence[str] | None = None) -> Namespace: ... 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: None) -> Namespace: ... # type: ignore[misc]
@overload @overload
def parse_args(self, args: Sequence[str] | None, namespace: _N) -> _N: ... def parse_args(self, args: Sequence[str] | None, namespace: _N) -> _N: ...
@overload @overload
def parse_args(self, *, namespace: None) -> Namespace: ... # type: ignore[misc]
@overload
def parse_args(self, *, namespace: _N) -> _N: ... def parse_args(self, *, namespace: _N) -> _N: ...
@overload @overload
def add_subparsers( def add_subparsers(

View File

@ -46,7 +46,7 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
def get_pid(self) -> int | None: ... # type: ignore[override] def get_pid(self) -> int | None: ... # type: ignore[override]
def get_pipe_transport(self, fd: int) -> _File: ... # type: ignore[override] def get_pipe_transport(self, fd: int) -> _File: ... # type: ignore[override]
def _check_proc(self) -> None: ... # undocumented 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 async def _connect_pipes(self, waiter: futures.Future[Any] | None) -> None: ... # undocumented
def _call(self, cb: Callable[..., object], *data: Any) -> None: ... # undocumented def _call(self, cb: Callable[..., object], *data: Any) -> None: ... # undocumented
def _pipe_connection_lost(self, fd: int, exc: BaseException | None) -> None: ... # undocumented def _pipe_connection_lost(self, fd: int, exc: BaseException | None) -> None: ... # undocumented

View File

@ -54,24 +54,24 @@ if sys.version_info >= (3, 11):
bufsize: Literal[0] = 0, bufsize: Literal[0] = 0,
encoding: None = None, encoding: None = None,
errors: 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 # These parameters are taken by subprocess.Popen, which this ultimately delegates to
executable: StrOrBytesPath | None = ..., executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = ..., preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = ..., close_fds: bool = True,
cwd: StrOrBytesPath | None = ..., cwd: StrOrBytesPath | None = None,
env: subprocess._ENV | None = ..., env: subprocess._ENV | None = None,
startupinfo: Any | None = ..., startupinfo: Any | None = None,
creationflags: int = ..., creationflags: int = 0,
restore_signals: bool = ..., restore_signals: bool = True,
start_new_session: bool = ..., start_new_session: bool = False,
pass_fds: Collection[int] = ..., pass_fds: Collection[int] = ...,
group: None | str | int = ..., group: None | str | int = None,
extra_groups: None | Collection[str | int] = ..., extra_groups: None | Collection[str | int] = None,
user: None | str | int = ..., user: None | str | int = None,
umask: int = ..., umask: int = -1,
process_group: int | None = ..., process_group: int | None = None,
pipesize: int = ..., pipesize: int = -1,
) -> Process: ... ) -> Process: ...
async def create_subprocess_exec( async def create_subprocess_exec(
program: _ExecArg, program: _ExecArg,
@ -87,23 +87,23 @@ if sys.version_info >= (3, 11):
encoding: None = None, encoding: None = None,
errors: None = None, errors: None = None,
# These parameters are taken by subprocess.Popen, which this ultimately delegates to # These parameters are taken by subprocess.Popen, which this ultimately delegates to
text: bool | None = ..., text: bool | None = None,
executable: StrOrBytesPath | None = ..., executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = ..., preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = ..., close_fds: bool = True,
cwd: StrOrBytesPath | None = ..., cwd: StrOrBytesPath | None = None,
env: subprocess._ENV | None = ..., env: subprocess._ENV | None = None,
startupinfo: Any | None = ..., startupinfo: Any | None = None,
creationflags: int = ..., creationflags: int = 0,
restore_signals: bool = ..., restore_signals: bool = True,
start_new_session: bool = ..., start_new_session: bool = False,
pass_fds: Collection[int] = ..., pass_fds: Collection[int] = ...,
group: None | str | int = ..., group: None | str | int = None,
extra_groups: None | Collection[str | int] = ..., extra_groups: None | Collection[str | int] = None,
user: None | str | int = ..., user: None | str | int = None,
umask: int = ..., umask: int = -1,
process_group: int | None = ..., process_group: int | None = None,
pipesize: int = ..., pipesize: int = -1,
) -> Process: ... ) -> Process: ...
elif sys.version_info >= (3, 10): elif sys.version_info >= (3, 10):
@ -120,23 +120,23 @@ elif sys.version_info >= (3, 10):
bufsize: Literal[0] = 0, bufsize: Literal[0] = 0,
encoding: None = None, encoding: None = None,
errors: 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 # These parameters are taken by subprocess.Popen, which this ultimately delegates to
executable: StrOrBytesPath | None = ..., executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = ..., preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = ..., close_fds: bool = True,
cwd: StrOrBytesPath | None = ..., cwd: StrOrBytesPath | None = None,
env: subprocess._ENV | None = ..., env: subprocess._ENV | None = None,
startupinfo: Any | None = ..., startupinfo: Any | None = None,
creationflags: int = ..., creationflags: int = 0,
restore_signals: bool = ..., restore_signals: bool = True,
start_new_session: bool = ..., start_new_session: bool = False,
pass_fds: Collection[int] = ..., pass_fds: Collection[int] = ...,
group: None | str | int = ..., group: None | str | int = None,
extra_groups: None | Collection[str | int] = ..., extra_groups: None | Collection[str | int] = None,
user: None | str | int = ..., user: None | str | int = None,
umask: int = ..., umask: int = -1,
pipesize: int = ..., pipesize: int = -1,
) -> Process: ... ) -> Process: ...
async def create_subprocess_exec( async def create_subprocess_exec(
program: _ExecArg, program: _ExecArg,
@ -152,22 +152,22 @@ elif sys.version_info >= (3, 10):
encoding: None = None, encoding: None = None,
errors: None = None, errors: None = None,
# These parameters are taken by subprocess.Popen, which this ultimately delegates to # These parameters are taken by subprocess.Popen, which this ultimately delegates to
text: bool | None = ..., text: bool | None = None,
executable: StrOrBytesPath | None = ..., executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = ..., preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = ..., close_fds: bool = True,
cwd: StrOrBytesPath | None = ..., cwd: StrOrBytesPath | None = None,
env: subprocess._ENV | None = ..., env: subprocess._ENV | None = None,
startupinfo: Any | None = ..., startupinfo: Any | None = None,
creationflags: int = ..., creationflags: int = 0,
restore_signals: bool = ..., restore_signals: bool = True,
start_new_session: bool = ..., start_new_session: bool = False,
pass_fds: Collection[int] = ..., pass_fds: Collection[int] = ...,
group: None | str | int = ..., group: None | str | int = None,
extra_groups: None | Collection[str | int] = ..., extra_groups: None | Collection[str | int] = None,
user: None | str | int = ..., user: None | str | int = None,
umask: int = ..., umask: int = -1,
pipesize: int = ..., pipesize: int = -1,
) -> Process: ... ) -> Process: ...
else: # >= 3.9 else: # >= 3.9
@ -185,22 +185,22 @@ else: # >= 3.9
bufsize: Literal[0] = 0, bufsize: Literal[0] = 0,
encoding: None = None, encoding: None = None,
errors: 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 # These parameters are taken by subprocess.Popen, which this ultimately delegates to
executable: StrOrBytesPath | None = ..., executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = ..., preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = ..., close_fds: bool = True,
cwd: StrOrBytesPath | None = ..., cwd: StrOrBytesPath | None = None,
env: subprocess._ENV | None = ..., env: subprocess._ENV | None = None,
startupinfo: Any | None = ..., startupinfo: Any | None = None,
creationflags: int = ..., creationflags: int = 0,
restore_signals: bool = ..., restore_signals: bool = True,
start_new_session: bool = ..., start_new_session: bool = False,
pass_fds: Collection[int] = ..., pass_fds: Collection[int] = ...,
group: None | str | int = ..., group: None | str | int = None,
extra_groups: None | Collection[str | int] = ..., extra_groups: None | Collection[str | int] = None,
user: None | str | int = ..., user: None | str | int = None,
umask: int = ..., umask: int = -1,
) -> Process: ... ) -> Process: ...
async def create_subprocess_exec( async def create_subprocess_exec(
program: _ExecArg, program: _ExecArg,
@ -217,19 +217,19 @@ else: # >= 3.9
encoding: None = None, encoding: None = None,
errors: None = None, errors: None = None,
# These parameters are taken by subprocess.Popen, which this ultimately delegates to # These parameters are taken by subprocess.Popen, which this ultimately delegates to
text: bool | None = ..., text: bool | None = None,
executable: StrOrBytesPath | None = ..., executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = ..., preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = ..., close_fds: bool = True,
cwd: StrOrBytesPath | None = ..., cwd: StrOrBytesPath | None = None,
env: subprocess._ENV | None = ..., env: subprocess._ENV | None = None,
startupinfo: Any | None = ..., startupinfo: Any | None = None,
creationflags: int = ..., creationflags: int = 0,
restore_signals: bool = ..., restore_signals: bool = True,
start_new_session: bool = ..., start_new_session: bool = False,
pass_fds: Collection[int] = ..., pass_fds: Collection[int] = ...,
group: None | str | int = ..., group: None | str | int = None,
extra_groups: None | Collection[str | int] = ..., extra_groups: None | Collection[str | int] = None,
user: None | str | int = ..., user: None | str | int = None,
umask: int = ..., umask: int = -1,
) -> Process: ... ) -> Process: ...

View File

@ -140,7 +140,7 @@ if sys.version_info >= (3, 10):
tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException, _T5 | BaseException] tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException, _T5 | BaseException]
]: ... ]: ...
@overload @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: else:
@overload @overload
@ -230,7 +230,7 @@ else:
tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException, _T5 | BaseException] tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException, _T5 | BaseException]
]: ... ]: ...
@overload @overload
def gather( # type: ignore[misc] def gather(
*coros_or_futures: _FutureLike[Any], loop: AbstractEventLoop | None = None, return_exceptions: bool = False *coros_or_futures: _FutureLike[Any], loop: AbstractEventLoop | None = None, return_exceptions: bool = False
) -> Future[list[Any]]: ... ) -> Future[list[Any]]: ...

View File

@ -110,6 +110,8 @@ class object:
def __dir__(self) -> Iterable[str]: ... def __dir__(self) -> Iterable[str]: ...
def __init_subclass__(cls) -> None: ... def __init_subclass__(cls) -> None: ...
@classmethod
def __subclasshook__(cls, __subclass: type) -> bool: ...
class staticmethod(Generic[_R_co]): class staticmethod(Generic[_R_co]):
@property @property
@ -445,7 +447,7 @@ class str(Sequence[str]):
@overload @overload
def format(self: LiteralString, *args: LiteralString, **kwargs: LiteralString) -> LiteralString: ... def format(self: LiteralString, *args: LiteralString, **kwargs: LiteralString) -> LiteralString: ...
@overload @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 format_map(self, map: _FormatMapMapping) -> str: ...
def index(self, __sub: str, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...) -> int: ... def index(self, __sub: str, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...) -> int: ...
def isalnum(self) -> bool: ... def isalnum(self) -> bool: ...
@ -575,7 +577,7 @@ class str(Sequence[str]):
@overload @overload
def __mod__(self: LiteralString, __x: LiteralString | tuple[LiteralString, ...]) -> LiteralString: ... def __mod__(self: LiteralString, __x: LiteralString | tuple[LiteralString, ...]) -> LiteralString: ...
@overload @overload
def __mod__(self, __x: Any) -> str: ... # type: ignore[misc] def __mod__(self, __x: Any) -> str: ...
@overload @overload
def __mul__(self: LiteralString, __n: SupportsIndex) -> LiteralString: ... def __mul__(self: LiteralString, __n: SupportsIndex) -> LiteralString: ...
@overload @overload
@ -1190,7 +1192,7 @@ class property:
def __delete__(self, __instance: Any) -> None: ... def __delete__(self, __instance: Any) -> None: ...
@final @final
class _NotImplementedType(Any): # type: ignore[misc] class _NotImplementedType(Any):
# A little weird, but typing the __call__ as NotImplemented makes the error message # A little weird, but typing the __call__ as NotImplemented makes the error message
# for NotImplemented() much better # for NotImplemented() much better
__call__: NotImplemented # type: ignore[valid-type] # pyright: ignore[reportGeneralTypeIssues] __call__: NotImplemented # type: ignore[valid-type] # pyright: ignore[reportGeneralTypeIssues]
@ -1611,11 +1613,11 @@ if sys.version_info >= (3, 8):
@overload @overload
def pow(base: int, exp: int, mod: int) -> int: ... def pow(base: int, exp: int, mod: int) -> int: ...
@overload @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 @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 @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 # 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 # return type must be Any as `int | float` causes too many false-positive errors
@overload @overload
@ -1648,11 +1650,11 @@ else:
@overload @overload
def pow(__base: int, __exp: int, __mod: int) -> int: ... def pow(__base: int, __exp: int, __mod: int) -> int: ...
@overload @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 @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 @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 @overload
def pow(__base: int, __exp: int, __mod: None = None) -> Any: ... def pow(__base: int, __exp: int, __mod: None = None) -> Any: ...
@overload @overload

View File

@ -80,14 +80,14 @@ class DictReader(Generic[_T], Iterator[_DictReadMapping[_T | Any, str | Any]]):
restval: str | None = None, restval: str | None = None,
dialect: _DialectLike = "excel", dialect: _DialectLike = "excel",
*, *,
delimiter: str = ..., delimiter: str = ",",
quotechar: str | None = ..., quotechar: str | None = '"',
escapechar: str | None = ..., escapechar: str | None = None,
doublequote: bool = ..., doublequote: bool = True,
skipinitialspace: bool = ..., skipinitialspace: bool = False,
lineterminator: str = ..., lineterminator: str = "\r\n",
quoting: _QuotingType = ..., quoting: _QuotingType = 0,
strict: bool = ..., strict: bool = False,
) -> None: ... ) -> None: ...
@overload @overload
def __init__( def __init__(
@ -98,14 +98,14 @@ class DictReader(Generic[_T], Iterator[_DictReadMapping[_T | Any, str | Any]]):
restval: str | None = None, restval: str | None = None,
dialect: _DialectLike = "excel", dialect: _DialectLike = "excel",
*, *,
delimiter: str = ..., delimiter: str = ",",
quotechar: str | None = ..., quotechar: str | None = '"',
escapechar: str | None = ..., escapechar: str | None = None,
doublequote: bool = ..., doublequote: bool = True,
skipinitialspace: bool = ..., skipinitialspace: bool = False,
lineterminator: str = ..., lineterminator: str = "\r\n",
quoting: _QuotingType = ..., quoting: _QuotingType = 0,
strict: bool = ..., strict: bool = False,
) -> None: ... ) -> None: ...
def __iter__(self) -> Self: ... def __iter__(self) -> Self: ...
def __next__(self) -> _DictReadMapping[_T | Any, str | Any]: ... def __next__(self) -> _DictReadMapping[_T | Any, str | Any]: ...
@ -125,14 +125,14 @@ class DictWriter(Generic[_T]):
extrasaction: Literal["raise", "ignore"] = "raise", extrasaction: Literal["raise", "ignore"] = "raise",
dialect: _DialectLike = "excel", dialect: _DialectLike = "excel",
*, *,
delimiter: str = ..., delimiter: str = ",",
quotechar: str | None = ..., quotechar: str | None = '"',
escapechar: str | None = ..., escapechar: str | None = None,
doublequote: bool = ..., doublequote: bool = True,
skipinitialspace: bool = ..., skipinitialspace: bool = False,
lineterminator: str = ..., lineterminator: str = "\r\n",
quoting: _QuotingType = ..., quoting: _QuotingType = 0,
strict: bool = ..., strict: bool = False,
) -> None: ... ) -> None: ...
if sys.version_info >= (3, 8): if sys.version_info >= (3, 8):
def writeheader(self) -> Any: ... def writeheader(self) -> Any: ...

View File

@ -57,9 +57,8 @@ class SequenceMatcher(Generic[_T]):
if sys.version_info >= (3, 9): if sys.version_info >= (3, 9):
def __class_getitem__(cls, item: Any) -> GenericAlias: ... def __class_getitem__(cls, item: Any) -> GenericAlias: ...
# mypy thinks the signatures of the overloads overlap, but the types still work fine
@overload @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 @overload
def get_close_matches( def get_close_matches(
word: Sequence[_T], possibilities: Iterable[Sequence[_T]], n: int = 3, cutoff: float = 0.6 word: Sequence[_T], possibilities: Iterable[Sequence[_T]], n: int = 3, cutoff: float = 0.6

View File

@ -1,3 +1,4 @@
from _typeshed import Incomplete
from abc import abstractmethod from abc import abstractmethod
from collections.abc import Callable, Iterable from collections.abc import Callable, Iterable
from distutils.dist import Distribution from distutils.dist import Distribution
@ -60,3 +61,5 @@ class Command:
skip_msg: str | None = None, skip_msg: str | None = None,
level: Any = 1, level: Any = 1,
) -> None: ... # level is not used ) -> None: ... # level is not used
def ensure_finalized(self) -> None: ...
def dump_options(self, header: Incomplete | None = None, indent: str = "") -> None: ...

View File

@ -1,9 +1,17 @@
from _typeshed import StrOrBytesPath
from collections.abc import Mapping from collections.abc import Mapping
from distutils.cmd import Command as Command from distutils.cmd import Command as Command
from distutils.dist import Distribution as Distribution from distutils.dist import Distribution as Distribution
from distutils.extension import Extension as Extension from distutils.extension import Extension as Extension
from typing import Any from typing import Any
USAGE: str
def gen_usage(script_name: StrOrBytesPath) -> str: ...
setup_keywords: tuple[str, ...]
extension_keywords: tuple[str, ...]
def setup( def setup(
*, *,
name: str = ..., name: str = ...,

View File

@ -1,4 +1,20 @@
from distutils.unixccompiler import UnixCCompiler 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 CygwinCCompiler(UnixCCompiler): ...
class Mingw32CCompiler(CygwinCCompiler): ... 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: ...

View File

@ -1,8 +1,11 @@
from _typeshed import FileDescriptorOrPath, SupportsWrite from _typeshed import FileDescriptorOrPath, Incomplete, SupportsWrite
from collections.abc import Iterable, Mapping from collections.abc import Iterable, Mapping
from distutils.cmd import Command from distutils.cmd import Command
from re import Pattern
from typing import IO, Any from typing import IO, Any
command_re: Pattern[str]
class DistributionMetadata: class DistributionMetadata:
def __init__(self, path: FileDescriptorOrPath | None = None) -> None: ... def __init__(self, path: FileDescriptorOrPath | None = None) -> None: ...
name: str | None name: str | None
@ -57,3 +60,57 @@ class Distribution:
def get_option_dict(self, command: str) -> dict[str, tuple[str, str]]: ... def get_option_dict(self, command: str) -> dict[str, tuple[str, str]]: ...
def parse_config_files(self, filenames: Iterable[str] | None = None) -> None: ... def parse_config_files(self, filenames: Iterable[str] | None = None) -> None: ...
def get_command_obj(self, command: str, create: bool = ...) -> Command | 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): ...

View File

@ -1,14 +1,15 @@
from collections.abc import Iterable, Mapping from collections.abc import Iterable, Mapping
from re import Pattern
from typing import Any, overload from typing import Any, overload
from typing_extensions import TypeAlias from typing_extensions import TypeAlias
_Option: TypeAlias = tuple[str, str | None, str] _Option: TypeAlias = tuple[str, str | None, str]
_GR: TypeAlias = tuple[list[str], OptionDummy] _GR: TypeAlias = tuple[list[str], OptionDummy]
def fancy_getopt( longopt_pat: str
options: list[_Option], negative_opt: Mapping[_Option, _Option], object: Any, args: list[str] | None longopt_re: Pattern[str]
) -> list[str] | _GR: ... neg_alias_re: Pattern[str]
def wrap_text(text: str, width: int) -> list[str]: ... longopt_xlate: dict[int, int]
class FancyGetopt: class FancyGetopt:
def __init__(self, option_table: list[_Option] | None = None) -> None: ... 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 get_option_order(self) -> list[tuple[str, str]]: ...
def generate_help(self, header: str | None = None) -> list[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: class OptionDummy:
def __init__(self, options: Iterable[str] = ...) -> None: ... def __init__(self, options: Iterable[str] = ...) -> None: ...

View File

@ -1,9 +1,15 @@
import sys
from collections.abc import Mapping from collections.abc import Mapping
from distutils.ccompiler import CCompiler from distutils.ccompiler import CCompiler
PREFIX: str PREFIX: str
EXEC_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_var(name: str) -> int | str | None: ...
def get_config_vars(*args: str) -> Mapping[str, int | str]: ... def get_config_vars(*args: str) -> Mapping[str, int | str]: ...
def get_config_h_filename() -> 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_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 get_python_lib(plat_specific: bool = ..., standard_lib: bool = ..., prefix: str | None = None) -> str: ...
def customize_compiler(compiler: CCompiler) -> None: ... def customize_compiler(compiler: CCompiler) -> None: ...
if sys.version_info < (3, 10):
def get_python_version() -> str: ...

View File

@ -1,8 +1,12 @@
import sys
from _typeshed import StrPath, Unused from _typeshed import StrPath, Unused
from collections.abc import Callable, Container, Iterable, Mapping from collections.abc import Callable, Container, Iterable, Mapping
from typing import Any from typing import Any
from typing_extensions import Literal from typing_extensions import Literal
if sys.version_info >= (3, 8):
def get_host_platform() -> str: ...
def get_platform() -> str: ... def get_platform() -> str: ...
def convert_path(pathname: str) -> str: ... def convert_path(pathname: str) -> str: ...
def change_root(new_root: str, pathname: str) -> str: ... def change_root(new_root: str, pathname: str) -> str: ...

View File

@ -4,7 +4,7 @@ from _typeshed import ReadableBuffer
class IncrementalEncoder(codecs.IncrementalEncoder): class IncrementalEncoder(codecs.IncrementalEncoder):
def __init__(self, errors: str = "strict") -> None: ... def __init__(self, errors: str = "strict") -> None: ...
def encode(self, input: str, final: bool = False) -> bytes: ... 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] def setstate(self, state: int) -> None: ... # type: ignore[override]
class IncrementalDecoder(codecs.BufferedIncrementalDecoder): class IncrementalDecoder(codecs.BufferedIncrementalDecoder):

View File

@ -114,7 +114,7 @@ class EnumMeta(ABCMeta):
def __bool__(self) -> Literal[True]: ... def __bool__(self) -> Literal[True]: ...
def __dir__(self) -> list[str]: ... def __dir__(self) -> list[str]: ...
# Simple value lookup # Simple value lookup
@overload # type: ignore[override] @overload
def __call__(cls: type[_EnumMemberT], value: Any, names: None = None) -> _EnumMemberT: ... def __call__(cls: type[_EnumMemberT], value: Any, names: None = None) -> _EnumMemberT: ...
# Functional Enum API # Functional Enum API
if sys.version_info >= (3, 11): if sys.version_info >= (3, 11):

View File

@ -1,9 +1,9 @@
import sys import sys
import types import types
from _typeshed import IdentityFunction, SupportsAllComparisons, SupportsItems from _typeshed import SupportsAllComparisons, SupportsItems
from collections.abc import Callable, Hashable, Iterable, Sequence, Sized from collections.abc import Callable, Hashable, Iterable, Sequence, Sized
from typing import Any, Generic, NamedTuple, TypeVar, overload 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): if sys.version_info >= (3, 9):
from types import GenericAlias from types import GenericAlias
@ -28,10 +28,12 @@ if sys.version_info >= (3, 8):
if sys.version_info >= (3, 9): if sys.version_info >= (3, 9):
__all__ += ["cache"] __all__ += ["cache"]
_AnyCallable: TypeAlias = Callable[..., object]
_T = TypeVar("_T") _T = TypeVar("_T")
_S = TypeVar("_S") _S = TypeVar("_S")
_PWrapped = ParamSpec("_PWrapped")
_RWrapped = TypeVar("_RWrapped")
_PWrapper = ParamSpec("_PWrapper")
_RWapper = TypeVar("_RWapper")
@overload @overload
def reduce(function: Callable[[_T, _S], _T], sequence: Iterable[_S], initial: _T) -> _T: ... 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__"]] WRAPPER_UPDATES: tuple[Literal["__dict__"]]
def update_wrapper(wrapper: _T, wrapped: _AnyCallable, assigned: Sequence[str] = ..., updated: Sequence[str] = ...) -> _T: ... class _Wrapped(Generic[_PWrapped, _RWrapped, _PWrapper, _RWapper]):
def wraps(wrapped: _AnyCallable, assigned: Sequence[str] = ..., updated: Sequence[str] = ...) -> IdentityFunction: ... __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 total_ordering(cls: type[_T]) -> type[_T]: ...
def cmp_to_key(mycmp: Callable[[_T, _T], int]) -> Callable[[_T], SupportsAllComparisons]: ... def cmp_to_key(mycmp: Callable[[_T, _T], int]) -> Callable[[_T], SupportsAllComparisons]: ...

View File

@ -57,8 +57,8 @@ class GNUTranslations(NullTranslations):
CONTEXT: str CONTEXT: str
VERSIONS: Sequence[int] VERSIONS: Sequence[int]
@overload # ignores incompatible overloads @overload
def find( # type: ignore[misc] def find(
domain: str, localedir: StrPath | None = None, languages: Iterable[str] | None = None, all: Literal[False] = False domain: str, localedir: StrPath | None = None, languages: Iterable[str] | None = None, all: Literal[False] = False
) -> str | None: ... ) -> str | None: ...
@overload @overload

View File

@ -30,7 +30,13 @@ class HMAC:
block_size: int block_size: int
@property @property
def name(self) -> str: ... def name(self) -> str: ...
if sys.version_info >= (3, 8):
def __init__(self, key: bytes | bytearray, msg: ReadableBuffer | None = None, digestmod: _DigestMod = "") -> None: ... 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 update(self, msg: ReadableBuffer) -> None: ...
def digest(self) -> bytes: ... def digest(self) -> bytes: ...
def hexdigest(self) -> str: ... def hexdigest(self) -> str: ...

View File

@ -174,7 +174,7 @@ class HTTPConnection:
class HTTPSConnection(HTTPConnection): class HTTPSConnection(HTTPConnection):
# Can be `None` if `.connect()` was not called: # Can be `None` if `.connect()` was not called:
sock: ssl.SSLSocket | Any # type: ignore[override] sock: ssl.SSLSocket | Any
def __init__( def __init__(
self, self,
host: str, host: str,

View File

@ -191,7 +191,7 @@ if sys.version_info >= (3, 9):
class TraversableResources(ResourceReader): class TraversableResources(ResourceReader):
@abstractmethod @abstractmethod
def files(self) -> Traversable: ... 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 resource_path(self, resource: Any) -> NoReturn: ...
def is_resource(self, path: str) -> bool: ... def is_resource(self, path: str) -> bool: ...
def contents(self) -> Iterator[str]: ... def contents(self) -> Iterator[str]: ...

View File

@ -116,74 +116,74 @@ class Logger(Filterer):
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def info( def info(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def warning( def warning(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def warn( def warn(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def error( def error(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def exception( def exception(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = True, exc_info: _ExcInfoType = True,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def critical( def critical(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def log( def log(
self, self,
level: int, level: int,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def _log( def _log(
self, self,
@ -200,66 +200,66 @@ class Logger(Filterer):
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def info( def info(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def warning( def warning(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def warn( def warn(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def error( def error(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def critical( def critical(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def log( def log(
self, self,
level: int, level: int,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def exception( def exception(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = True, exc_info: _ExcInfoType = True,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def _log( def _log(
self, self,
@ -432,50 +432,50 @@ class LoggerAdapter(Generic[_L]):
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
def info( def info(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
def warning( def warning(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
def warn( def warn(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
def error( def error(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
def exception( def exception(
@ -483,19 +483,19 @@ class LoggerAdapter(Generic[_L]):
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = True, exc_info: _ExcInfoType = True,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
def critical( def critical(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
def log( def log(
@ -503,10 +503,10 @@ class LoggerAdapter(Generic[_L]):
level: int, level: int,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
else: else:
@ -514,45 +514,45 @@ class LoggerAdapter(Generic[_L]):
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
def info( def info(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
def warning( def warning(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
def warn( def warn(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
def error( def error(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
def exception( def exception(
@ -560,17 +560,17 @@ class LoggerAdapter(Generic[_L]):
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = True, exc_info: _ExcInfoType = True,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
def critical( def critical(
self, self,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
def log( def log(
@ -578,9 +578,9 @@ class LoggerAdapter(Generic[_L]):
level: int, level: int,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
**kwargs: object, **kwargs: object,
) -> None: ... ) -> None: ...
@ -610,102 +610,126 @@ if sys.version_info >= (3, 8):
def debug( def debug(
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def info( def info(
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def warning( def warning(
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def warn( def warn(
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def error( def error(
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def critical( def critical(
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def exception( def exception(
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = True, exc_info: _ExcInfoType = True,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def log( def log(
level: int, level: int,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
stacklevel: int = ..., stacklevel: int = 1,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
else: else:
def debug( 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: ... ) -> None: ...
def info( 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: ... ) -> None: ...
def warning( 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: ... ) -> None: ...
def warn( 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: ... ) -> None: ...
def error( 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: ... ) -> None: ...
def critical( 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: ... ) -> None: ...
def exception( def exception(
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = True, exc_info: _ExcInfoType = True,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
def log( def log(
level: int, level: int,
msg: object, msg: object,
*args: object, *args: object,
exc_info: _ExcInfoType = ..., exc_info: _ExcInfoType = None,
stack_info: bool = ..., stack_info: bool = False,
extra: Mapping[str, object] | None = ..., extra: Mapping[str, object] | None = None,
) -> None: ... ) -> None: ...
fatal = critical fatal = critical

View File

@ -1,14 +1,13 @@
from multiprocessing.connection import _Address
from queue import Queue from queue import Queue
from types import TracebackType from types import TracebackType
from typing import Any from typing import Any
from typing_extensions import Self, TypeAlias from typing_extensions import Self
__all__ = ["Client", "Listener", "Pipe"] __all__ = ["Client", "Listener", "Pipe"]
families: list[None] families: list[None]
_Address: TypeAlias = str | tuple[str, int]
class Connection: class Connection:
_in: Any _in: Any
_out: Any _out: Any

View File

@ -664,7 +664,7 @@ class socket(_socket.socket):
# Note that the makefile's documented windows-specific behavior is not represented # Note that the makefile's documented windows-specific behavior is not represented
# mode strings with duplicates are intentionally excluded # mode strings with duplicates are intentionally excluded
@overload @overload
def makefile( # type: ignore[misc] def makefile(
self, self,
mode: Literal["b", "rb", "br", "wb", "bw", "rwb", "rbw", "wrb", "wbr", "brw", "bwr"], mode: Literal["b", "rb", "br", "wb", "bw", "rwb", "rbw", "wrb", "wbr", "brw", "bwr"],
buffering: Literal[0], buffering: Literal[0],
@ -725,9 +725,9 @@ class socket(_socket.socket):
) -> TextIOWrapper: ... ) -> TextIOWrapper: ...
def sendfile(self, file: _SendableFile, offset: int = 0, count: int | None = None) -> int: ... def sendfile(self, file: _SendableFile, offset: int = 0, count: int | None = None) -> int: ...
@property @property
def family(self) -> AddressFamily: ... # type: ignore[override] def family(self) -> AddressFamily: ...
@property @property
def type(self) -> SocketKind: ... # type: ignore[override] def type(self) -> SocketKind: ...
def get_inheritable(self) -> bool: ... def get_inheritable(self) -> bool: ...
def set_inheritable(self, inheritable: bool) -> None: ... def set_inheritable(self, inheritable: bool) -> None: ...

View File

@ -30,7 +30,7 @@ if sys.platform != "win32":
] ]
_RequestType: TypeAlias = _socket | tuple[bytes, _socket] _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 _AfInetAddress: TypeAlias = tuple[str | bytes | bytearray, int] # address acceptable for an AF_INET socket
# This can possibly be generic at some point: # This can possibly be generic at some point:
@ -70,7 +70,7 @@ class BaseServer:
class TCPServer(BaseServer): class TCPServer(BaseServer):
if sys.version_info >= (3, 11): if sys.version_info >= (3, 11):
allow_reuse_port: bool allow_reuse_port: bool
server_address: _AfInetAddress # type: ignore[assignment] server_address: _AfInetAddress
def __init__( def __init__(
self, self,
server_address: _AfInetAddress, server_address: _AfInetAddress,

View File

@ -55,49 +55,49 @@ def wrap(
text: str, text: str,
width: int = 70, width: int = 70,
*, *,
initial_indent: str = ..., initial_indent: str = "",
subsequent_indent: str = ..., subsequent_indent: str = "",
expand_tabs: bool = ..., expand_tabs: bool = True,
tabsize: int = ..., tabsize: int = 8,
replace_whitespace: bool = ..., replace_whitespace: bool = True,
fix_sentence_endings: bool = ..., fix_sentence_endings: bool = False,
break_long_words: bool = ..., break_long_words: bool = True,
break_on_hyphens: bool = ..., break_on_hyphens: bool = True,
drop_whitespace: bool = ..., drop_whitespace: bool = True,
max_lines: int | None = None, max_lines: int | None = None,
placeholder: str = ..., placeholder: str = " [...]",
) -> list[str]: ... ) -> list[str]: ...
def fill( def fill(
text: str, text: str,
width: int = 70, width: int = 70,
*, *,
initial_indent: str = ..., initial_indent: str = "",
subsequent_indent: str = ..., subsequent_indent: str = "",
expand_tabs: bool = ..., expand_tabs: bool = True,
tabsize: int = ..., tabsize: int = 8,
replace_whitespace: bool = ..., replace_whitespace: bool = True,
fix_sentence_endings: bool = ..., fix_sentence_endings: bool = False,
break_long_words: bool = ..., break_long_words: bool = True,
break_on_hyphens: bool = ..., break_on_hyphens: bool = True,
drop_whitespace: bool = ..., drop_whitespace: bool = True,
max_lines: int | None = None, max_lines: int | None = None,
placeholder: str = ..., placeholder: str = " [...]",
) -> str: ... ) -> str: ...
def shorten( def shorten(
text: str, text: str,
width: int, width: int,
*, *,
initial_indent: str = ..., initial_indent: str = "",
subsequent_indent: str = ..., subsequent_indent: str = "",
expand_tabs: bool = ..., expand_tabs: bool = True,
tabsize: int = ..., tabsize: int = 8,
replace_whitespace: bool = ..., replace_whitespace: bool = True,
fix_sentence_endings: bool = ..., fix_sentence_endings: bool = False,
break_long_words: bool = ..., break_long_words: bool = True,
break_on_hyphens: bool = ..., break_on_hyphens: bool = True,
drop_whitespace: bool = ..., drop_whitespace: bool = True,
# Omit `max_lines: int = None`, it is forced to 1 here. # Omit `max_lines: int = None`, it is forced to 1 here.
placeholder: str = ..., placeholder: str = " [...]",
) -> str: ... ) -> str: ...
def dedent(text: str) -> str: ... def dedent(text: str) -> str: ...
def indent(text: str, prefix: str, predicate: Callable[[str], bool] | None = None) -> str: ... def indent(text: str, prefix: str, predicate: Callable[[str], bool] | None = None) -> str: ...

View File

@ -3207,7 +3207,7 @@ class OptionMenu(Menubutton):
# destroy and __getitem__ are overridden, signature does not change # destroy and __getitem__ are overridden, signature does not change
# Marker to indicate that it is a valid bitmap/photo image. PIL implements compatible versions # 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. # not something that type checkers can detect.
@type_check_only @type_check_only
class _Image: ... class _Image: ...

View File

@ -132,12 +132,12 @@ class TracebackException:
cls, cls,
exc: BaseException, exc: BaseException,
*, *,
limit: int | None = ..., limit: int | None = None,
lookup_lines: bool = ..., lookup_lines: bool = True,
capture_locals: bool = ..., capture_locals: bool = False,
compact: bool = ..., compact: bool = False,
max_group_width: int = ..., max_group_width: int = 15,
max_group_depth: int = ..., max_group_depth: int = 10,
) -> Self: ... ) -> Self: ...
elif sys.version_info >= (3, 10): elif sys.version_info >= (3, 10):
def __init__( def __init__(
@ -157,10 +157,10 @@ class TracebackException:
cls, cls,
exc: BaseException, exc: BaseException,
*, *,
limit: int | None = ..., limit: int | None = None,
lookup_lines: bool = ..., lookup_lines: bool = True,
capture_locals: bool = ..., capture_locals: bool = False,
compact: bool = ..., compact: bool = False,
) -> Self: ... ) -> Self: ...
else: else:
def __init__( def __init__(
@ -176,7 +176,7 @@ class TracebackException:
) -> None: ... ) -> None: ...
@classmethod @classmethod
def from_exception( 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: ... ) -> Self: ...
def __eq__(self, other: object) -> bool: ... def __eq__(self, other: object) -> bool: ...

View File

@ -20,6 +20,11 @@ from types import (
) )
from typing_extensions import Never as _Never, ParamSpec as _ParamSpec, final as _final 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__ = [ __all__ = [
"AbstractSet", "AbstractSet",
"Any", "Any",
@ -254,7 +259,7 @@ _T_contra = TypeVar("_T_contra", contravariant=True) # Ditto contravariant.
_TC = TypeVar("_TC", bound=Type[object]) _TC = TypeVar("_TC", bound=Type[object])
def no_type_check(arg: _F) -> _F: ... 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 # Type aliases and type constructors
@ -745,9 +750,21 @@ else:
) -> dict[str, Any]: ... ) -> dict[str, Any]: ...
if sys.version_info >= (3, 8): if sys.version_info >= (3, 8):
def get_origin(tp: Any) -> Any | None: ...
def get_args(tp: Any) -> tuple[Any, ...]: ... 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 @overload
def cast(typ: Type[_T], val: Any) -> _T: ... def cast(typ: Type[_T], val: Any) -> _T: ...
@overload @overload

View File

@ -32,6 +32,11 @@ from typing import ( # noqa: Y022,Y039
type_check_only, type_check_only,
) )
if sys.version_info >= (3, 10):
from types import UnionType
if sys.version_info >= (3, 9):
from types import GenericAlias
__all__ = [ __all__ = [
"Any", "Any",
"ClassVar", "ClassVar",
@ -155,6 +160,18 @@ def get_type_hints(
include_extras: bool = False, include_extras: bool = False,
) -> dict[str, Any]: ... ) -> dict[str, Any]: ...
def get_args(tp: Any) -> tuple[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: ... def get_origin(tp: Any) -> Any | None: ...
Annotated: _SpecialForm Annotated: _SpecialForm

View File

@ -132,7 +132,7 @@ class TestCase:
# are not using `ParamSpec` intentionally, # are not using `ParamSpec` intentionally,
# because they might be used with explicitly wrong arg types to raise some error in tests. # because they might be used with explicitly wrong arg types to raise some error in tests.
@overload @overload
def assertRaises( # type: ignore[misc] def assertRaises(
self, self,
expected_exception: type[BaseException] | tuple[type[BaseException], ...], expected_exception: type[BaseException] | tuple[type[BaseException], ...],
callable: Callable[..., Any], callable: Callable[..., Any],
@ -144,7 +144,7 @@ class TestCase:
self, expected_exception: type[_E] | tuple[type[_E], ...], *, msg: Any = ... self, expected_exception: type[_E] | tuple[type[_E], ...], *, msg: Any = ...
) -> _AssertRaisesContext[_E]: ... ) -> _AssertRaisesContext[_E]: ...
@overload @overload
def assertRaisesRegex( # type: ignore[misc] def assertRaisesRegex(
self, self,
expected_exception: type[BaseException] | tuple[type[BaseException], ...], expected_exception: type[BaseException] | tuple[type[BaseException], ...],
expected_regex: str | Pattern[str], 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 = ... self, expected_exception: type[_E] | tuple[type[_E], ...], expected_regex: str | Pattern[str], *, msg: Any = ...
) -> _AssertRaisesContext[_E]: ... ) -> _AssertRaisesContext[_E]: ...
@overload @overload
def assertWarns( # type: ignore[misc] def assertWarns(
self, self,
expected_warning: type[Warning] | tuple[type[Warning], ...], expected_warning: type[Warning] | tuple[type[Warning], ...],
callable: Callable[_P, Any], callable: Callable[_P, Any],
@ -169,7 +169,7 @@ class TestCase:
self, expected_warning: type[Warning] | tuple[type[Warning], ...], *, msg: Any = ... self, expected_warning: type[Warning] | tuple[type[Warning], ...], *, msg: Any = ...
) -> _AssertWarnsContext: ... ) -> _AssertWarnsContext: ...
@overload @overload
def assertWarnsRegex( # type: ignore[misc] def assertWarnsRegex(
self, self,
expected_warning: type[Warning] | tuple[type[Warning], ...], expected_warning: type[Warning] | tuple[type[Warning], ...],
expected_regex: str | Pattern[str], expected_regex: str | Pattern[str],

View File

@ -58,13 +58,13 @@ if sys.version_info >= (3, 8):
*, *,
out: None = None, out: None = None,
from_file: _FileRead | None = None, from_file: _FileRead | None = None,
with_comments: bool = ..., with_comments: bool = False,
strip_text: bool = ..., strip_text: bool = False,
rewrite_prefixes: bool = ..., rewrite_prefixes: bool = False,
qname_aware_tags: Iterable[str] | None = ..., qname_aware_tags: Iterable[str] | None = None,
qname_aware_attrs: Iterable[str] | None = ..., qname_aware_attrs: Iterable[str] | None = None,
exclude_attrs: Iterable[str] | None = ..., exclude_attrs: Iterable[str] | None = None,
exclude_tags: Iterable[str] | None = ..., exclude_tags: Iterable[str] | None = None,
) -> str: ... ) -> str: ...
@overload @overload
def canonicalize( def canonicalize(
@ -72,13 +72,13 @@ if sys.version_info >= (3, 8):
*, *,
out: SupportsWrite[str], out: SupportsWrite[str],
from_file: _FileRead | None = None, from_file: _FileRead | None = None,
with_comments: bool = ..., with_comments: bool = False,
strip_text: bool = ..., strip_text: bool = False,
rewrite_prefixes: bool = ..., rewrite_prefixes: bool = False,
qname_aware_tags: Iterable[str] | None = ..., qname_aware_tags: Iterable[str] | None = None,
qname_aware_attrs: Iterable[str] | None = ..., qname_aware_attrs: Iterable[str] | None = None,
exclude_attrs: Iterable[str] | None = ..., exclude_attrs: Iterable[str] | None = None,
exclude_tags: Iterable[str] | None = ..., exclude_tags: Iterable[str] | None = None,
) -> None: ... ) -> None: ...
class Element: class Element:

View File

@ -1,12 +1,11 @@
from _typeshed import Unused
from collections.abc import Sequence from collections.abc import Sequence
from ctypes import _CVoidConstPLike from ctypes import _CVoidConstPLike
from typing import TypeVar from typing import TypeVar
from typing_extensions import TypeAlias
from d3dshot.capture_output import CaptureOutput from d3dshot.capture_output import CaptureOutput
from PIL import Image from PIL import Image
_Unused: TypeAlias = object
_ImageT = TypeVar("_ImageT", bound=Image.Image) _ImageT = TypeVar("_ImageT", bound=Image.Image)
class PILCaptureOutput(CaptureOutput): class PILCaptureOutput(CaptureOutput):
@ -22,4 +21,4 @@ class PILCaptureOutput(CaptureOutput):
rotation: int, rotation: int,
) -> Image.Image: ... ) -> Image.Image: ...
def to_pil(self, frame: _ImageT) -> _ImageT: ... 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]: ...

View File

@ -1,4 +1,5 @@
import sys import sys
from _typeshed import Unused
from collections.abc import Callable, Generator, Iterable, Iterator, Sequence from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
from typing import Any, NoReturn, overload from typing import Any, NoReturn, overload
from typing_extensions import Literal, Self from typing_extensions import Literal, Self
@ -80,7 +81,7 @@ class Client:
session_id: str | None = ..., session_id: str | None = ...,
) -> None: ... ) -> None: ...
def __enter__(self) -> Self: ... def __enter__(self) -> Self: ...
def __exit__(self, *args: object) -> None: ... def __exit__(self, *args: Unused) -> None: ...
@property @property
def name(self) -> str: ... def name(self) -> str: ...
@property @property

View File

@ -1,4 +1,5 @@
version = "9.4.*" version = "9.4.*"
[tool.stubtest] [tool.stubtest]
stubtest_requirements = ["olefile"]
ignore_missing_stub = true ignore_missing_stub = true

View File

@ -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 collections.abc import Callable, Iterable, Iterator, MutableMapping, Sequence
from enum import IntEnum from enum import IntEnum
from pathlib import Path from pathlib import Path
@ -172,7 +172,7 @@ class Image:
@property @property
def size(self) -> tuple[int, int]: ... def size(self) -> tuple[int, int]: ...
def __enter__(self) -> Self: ... def __enter__(self) -> Self: ...
def __exit__(self, *args: object) -> None: ... def __exit__(self, *args: Unused) -> None: ...
def close(self) -> None: ... def close(self) -> None: ...
def __eq__(self, other: object) -> bool: ... def __eq__(self, other: object) -> bool: ...
def __getstate__(self) -> _ImageState: ... def __getstate__(self) -> _ImageState: ...

View File

@ -1,4 +1,4 @@
from _typeshed import Incomplete from _typeshed import Incomplete, Unused
from typing import Any, NoReturn from typing import Any, NoReturn
from typing_extensions import Self from typing_extensions import Self
@ -42,7 +42,7 @@ class Parser:
decode: Any decode: Any
def feed(self, data) -> None: ... def feed(self, data) -> None: ...
def __enter__(self) -> Self: ... def __enter__(self) -> Self: ...
def __exit__(self, *args: object) -> None: ... def __exit__(self, *args: Unused) -> None: ...
def close(self) -> Image: ... def close(self) -> Image: ...
class PyCodecState: class PyCodecState:

View File

@ -1,4 +1,4 @@
from _typeshed import SupportsWrite from _typeshed import SupportsWrite, Unused
from .Image import Image from .Image import Image
@ -6,7 +6,7 @@ class PSDraw:
fp: SupportsWrite[bytes] fp: SupportsWrite[bytes]
def __init__(self, fp: SupportsWrite[bytes] | None = ...) -> None: ... def __init__(self, fp: SupportsWrite[bytes] | None = ...) -> None: ...
isofont: dict[bytes, int] 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 end_document(self) -> None: ...
def setfont(self, font: str, size: int) -> None: ... def setfont(self, font: str, size: int) -> None: ...
def line(self, xy0: tuple[int, int], xy1: tuple[int, int]) -> None: ... def line(self, xy0: tuple[int, int], xy1: tuple[int, int]) -> None: ...

View File

@ -1,6 +1,8 @@
import collections import collections
from _typeshed import Incomplete from _typeshed import Incomplete
from types import TracebackType
from typing import Any from typing import Any
from typing_extensions import Literal
def encode_text(s: str) -> bytes: ... def encode_text(s: str) -> bytes: ...
@ -95,7 +97,9 @@ class PdfParser:
mode: str = ..., mode: str = ...,
) -> None: ... ) -> None: ...
def __enter__(self): ... 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 start_writing(self) -> None: ...
def close_buf(self) -> None: ... def close_buf(self) -> None: ...
def close(self) -> None: ... def close(self) -> None: ...

View File

@ -1,4 +1,4 @@
from _typeshed import Incomplete from _typeshed import Incomplete, Unused
from enum import IntEnum from enum import IntEnum
from typing import Any, ClassVar from typing import Any, ClassVar
from typing_extensions import Literal from typing_extensions import Literal
@ -33,7 +33,7 @@ class ChunkStream:
def __init__(self, fp) -> None: ... def __init__(self, fp) -> None: ...
def read(self): ... def read(self): ...
def __enter__(self): ... def __enter__(self): ...
def __exit__(self, *args) -> None: ... def __exit__(self, *args: Unused) -> None: ...
def close(self) -> None: ... def close(self) -> None: ...
def push(self, cid, pos, length) -> None: ... def push(self, cid, pos, length) -> None: ...
def call(self, cid, pos, length): ... def call(self, cid, pos, length): ...

View File

@ -1,3 +1,4 @@
from _typeshed import Unused
from typing import Any from typing import Any
from .ContainerIO import ContainerIO from .ContainerIO import ContainerIO
@ -6,5 +7,5 @@ class TarIO(ContainerIO):
fh: Any fh: Any
def __init__(self, tarfile, file) -> None: ... def __init__(self, tarfile, file) -> None: ...
def __enter__(self): ... def __enter__(self): ...
def __exit__(self, *args) -> None: ... def __exit__(self, *args: Unused) -> None: ...
def close(self) -> None: ... def close(self) -> None: ...

View File

@ -1,6 +1,7 @@
from _typeshed import Incomplete from _typeshed import Incomplete
from collections.abc import MutableMapping from collections.abc import MutableMapping
from numbers import Rational from numbers import Rational
from types import TracebackType
from typing import Any, ClassVar from typing import Any, ClassVar
from typing_extensions import Literal from typing_extensions import Literal
@ -171,7 +172,9 @@ class AppendingTiffWriter:
def finalize(self) -> None: ... def finalize(self) -> None: ...
def newFrame(self) -> None: ... def newFrame(self) -> None: ...
def __enter__(self): ... 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 tell(self): ...
def seek(self, offset, whence=...): ... def seek(self, offset, whence=...): ...
def goToEnd(self) -> None: ... def goToEnd(self) -> None: ...

View File

@ -1,5 +1,6 @@
import datetime import datetime
import time import time
from _typeshed import Unused
from collections.abc import Callable, Mapping, Sequence from collections.abc import Callable, Mapping, Sequence
from decimal import Decimal from decimal import Decimal
from typing import Any, TypeVar 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_datetime(obj: datetime.datetime, mapping: _EscaperMapping = ...) -> str: ...
def escape_date(obj: datetime.date, mapping: _EscaperMapping = ...) -> str: ... def escape_date(obj: datetime.date, mapping: _EscaperMapping = ...) -> str: ...
def escape_struct_time(obj: time.struct_time, 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_datetime(obj: str | bytes) -> datetime.datetime | str: ...
def convert_timedelta(obj: str | bytes) -> datetime.timedelta | str: ... def convert_timedelta(obj: str | bytes) -> datetime.timedelta | str: ...
def convert_time(obj: str | bytes) -> datetime.time | str: ... def convert_time(obj: str | bytes) -> datetime.time | str: ...

View File

@ -1,11 +1,10 @@
from _typeshed import Incomplete, StrOrBytesPath from _typeshed import Incomplete, StrOrBytesPath, Unused
from collections.abc import Callable, Generator from collections.abc import Callable, Generator
from typing import NamedTuple, SupportsFloat, TypeVar, overload from typing import NamedTuple, SupportsFloat, TypeVar, overload
from typing_extensions import Final, ParamSpec, SupportsIndex, TypeAlias from typing_extensions import Final, ParamSpec, SupportsIndex, TypeAlias
from PIL import Image from PIL import Image
_Unused: TypeAlias = object
_P = ParamSpec("_P") _P = ParamSpec("_P")
_R = TypeVar("_R") _R = TypeVar("_R")
# TODO: cv2.Mat is not available as a type yet: # TODO: cv2.Mat is not available as a type yet:
@ -49,7 +48,7 @@ def locate(
haystackImage: str | Image.Image | _Mat, haystackImage: str | Image.Image | _Mat,
*, *,
grayscale: bool | None = None, grayscale: bool | None = None,
limit: _Unused = 1, limit: Unused = 1,
region: tuple[int, int, int, int] | None = None, region: tuple[int, int, int, int] | None = None,
step: int = 1, step: int = 1,
confidence: SupportsFloat | SupportsIndex | str = 0.999, confidence: SupportsFloat | SupportsIndex | str = 0.999,
@ -62,7 +61,7 @@ def locate(
haystackImage: str | Image.Image, haystackImage: str | Image.Image,
*, *,
grayscale: bool | None = None, grayscale: bool | None = None,
limit: _Unused = 1, limit: Unused = 1,
region: tuple[int, int, int, int] | None = None, region: tuple[int, int, int, int] | None = None,
step: int = 1, step: int = 1,
confidence: None = None, confidence: None = None,
@ -75,7 +74,7 @@ def locateOnScreen(
minSearchTime: float = 0, minSearchTime: float = 0,
*, *,
grayscale: bool | None = None, grayscale: bool | None = None,
limit: _Unused = 1, limit: Unused = 1,
region: tuple[int, int, int, int] | None = None, region: tuple[int, int, int, int] | None = None,
step: int = 1, step: int = 1,
confidence: SupportsFloat | SupportsIndex | str = 0.999, confidence: SupportsFloat | SupportsIndex | str = 0.999,
@ -88,7 +87,7 @@ def locateOnScreen(
minSearchTime: float = 0, minSearchTime: float = 0,
*, *,
grayscale: bool | None = None, grayscale: bool | None = None,
limit: _Unused = 1, limit: Unused = 1,
region: tuple[int, int, int, int] | None = None, region: tuple[int, int, int, int] | None = None,
step: int = 1, step: int = 1,
confidence: None = None, confidence: None = None,
@ -125,7 +124,7 @@ def locateCenterOnScreen(
*, *,
minSearchTime: float, minSearchTime: float,
grayscale: bool | None = None, grayscale: bool | None = None,
limit: _Unused = 1, limit: Unused = 1,
region: tuple[int, int, int, int] | None = None, region: tuple[int, int, int, int] | None = None,
step: int = 1, step: int = 1,
confidence: SupportsFloat | SupportsIndex | str = 0.999, confidence: SupportsFloat | SupportsIndex | str = 0.999,
@ -138,7 +137,7 @@ def locateCenterOnScreen(
*, *,
minSearchTime: float, minSearchTime: float,
grayscale: bool | None = None, grayscale: bool | None = None,
limit: _Unused = 1, limit: Unused = 1,
region: tuple[int, int, int, int] | None = None, region: tuple[int, int, int, int] | None = None,
step: int = 1, step: int = 1,
confidence: None = None, confidence: None = None,
@ -151,7 +150,7 @@ def locateOnWindow(
title: str, title: str,
*, *,
grayscale: bool | None = None, grayscale: bool | None = None,
limit: _Unused = 1, limit: Unused = 1,
step: int = 1, step: int = 1,
confidence: SupportsFloat | SupportsIndex | str = 0.999, confidence: SupportsFloat | SupportsIndex | str = 0.999,
) -> Box | None: ... ) -> Box | None: ...
@ -163,7 +162,7 @@ def locateOnWindow(
title: str, title: str,
*, *,
grayscale: bool | None = None, grayscale: bool | None = None,
limit: _Unused = 1, limit: Unused = 1,
step: int = 1, step: int = 1,
confidence: None = None, confidence: None = None,
) -> Box | None: ... ) -> Box | None: ...

View File

@ -2,4 +2,5 @@ version = "2.14.*"
requires = ["types-docutils", "types-setuptools"] requires = ["types-docutils", "types-setuptools"]
[tool.stubtest] [tool.stubtest]
stubtest_requirements = ["sphinx"]
ignore_missing_stub = true ignore_missing_stub = true

View File

@ -6,4 +6,5 @@ extra_description = """\
obsolete_since = "2.0.0" # Released on 2023-01-26 obsolete_since = "2.0.0" # Released on 2023-01-26
[tool.stubtest] [tool.stubtest]
stubtest_requirements = ["pytest"]
ignore_missing_stub = true ignore_missing_stub = true

View File

@ -1,4 +1,4 @@
from _typeshed import SupportsItems from _typeshed import SupportsItems, Unused
from collections.abc import Iterable, Mapping, Sequence from collections.abc import Iterable, Mapping, Sequence
from typing import Any, NamedTuple from typing import Any, NamedTuple
from typing_extensions import Self, TypeAlias from typing_extensions import Self, TypeAlias
@ -6,11 +6,14 @@ from typing_extensions import Self, TypeAlias
from ..util import immutabledict from ..util import immutabledict
from .interfaces import Dialect from .interfaces import Dialect
# object that produces a password when called with str()
_PasswordObject: TypeAlias = object
# stub-only helper class # stub-only helper class
class _URLTuple(NamedTuple): class _URLTuple(NamedTuple):
drivername: str drivername: str
username: str | None username: str | None
password: str | object | None # object that produces a password when called with str() password: str | _PasswordObject | None
host: str | None host: str | None
port: int | None port: int | None
database: str | None database: str | None
@ -24,7 +27,7 @@ class URL(_URLTuple):
cls, cls,
drivername: str, drivername: str,
username: str | None = ..., username: str | None = ...,
password: str | object | None = ..., # object that produces a password when called with str() password: str | _PasswordObject | None = None,
host: str | None = ..., host: str | None = ...,
port: int | None = ..., port: int | None = ...,
database: str | None = ..., database: str | None = ...,
@ -34,7 +37,7 @@ class URL(_URLTuple):
self, self,
drivername: str | None = ..., drivername: str | None = ...,
username: str | None = ..., username: str | None = ...,
password: str | object | None = ..., password: str | _PasswordObject | None = None,
host: str | None = ..., host: str | None = ...,
port: int | None = ..., port: int | None = ...,
database: str | None = ..., database: str | None = ...,
@ -49,7 +52,7 @@ class URL(_URLTuple):
def __to_string__(self, hide_password: bool = ...) -> str: ... def __to_string__(self, hide_password: bool = ...) -> str: ...
def render_as_string(self, hide_password: bool = ...) -> str: ... def render_as_string(self, hide_password: bool = ...) -> str: ...
def __copy__(self) -> Self: ... def __copy__(self) -> Self: ...
def __deepcopy__(self, memo: object) -> Self: ... def __deepcopy__(self, memo: Unused) -> Self: ...
def __hash__(self) -> int: ... def __hash__(self) -> int: ...
def __eq__(self, other: object) -> bool: ... def __eq__(self, other: object) -> bool: ...
def __ne__(self, other: object) -> bool: ... def __ne__(self, other: object) -> bool: ...

View File

@ -1,4 +1,5 @@
import abc import abc
from types import TracebackType
class ReversibleProxy: ... class ReversibleProxy: ...
@ -8,7 +9,9 @@ class StartableContext(abc.ABC, metaclass=abc.ABCMeta):
def __await__(self): ... def __await__(self): ...
async def __aenter__(self): ... async def __aenter__(self): ...
@abc.abstractmethod @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): class ProxyComparable(ReversibleProxy):
def __hash__(self) -> int: ... def __hash__(self) -> int: ...

View File

@ -1,4 +1,5 @@
from _typeshed import Incomplete from _typeshed import Incomplete
from types import TracebackType
from typing import Any from typing import Any
from .base import ProxyComparable, StartableContext 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 stream_scalars(self, statement, parameters: Incomplete | None = ..., execution_options=...): ...
async def run_sync(self, fn, *arg, **kw): ... async def run_sync(self, fn, *arg, **kw): ...
def __await__(self): ... 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 # proxied from Connection
dialect: Any dialect: Any
@property @property
@ -55,7 +58,9 @@ class AsyncEngine(ProxyComparable, AsyncConnectable):
def __init__(self, conn) -> None: ... def __init__(self, conn) -> None: ...
transaction: Any transaction: Any
async def start(self, is_ctxmanager: bool = ...): ... 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 sync_engine: Any
def __init__(self, sync_engine) -> None: ... def __init__(self, sync_engine) -> None: ...
def begin(self): ... def begin(self): ...
@ -91,4 +96,6 @@ class AsyncTransaction(ProxyComparable, StartableContext):
async def rollback(self) -> None: ... async def rollback(self) -> None: ...
async def commit(self) -> None: ... async def commit(self) -> None: ...
async def start(self, is_ctxmanager: bool = ...): ... 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: ...

View File

@ -1,4 +1,5 @@
from _typeshed import Incomplete from _typeshed import Incomplete
from types import TracebackType
from typing import Any from typing import Any
from typing_extensions import Self from typing_extensions import Self
@ -55,7 +56,9 @@ class AsyncSession(ReversibleProxy):
@classmethod @classmethod
async def close_all(cls): ... async def close_all(cls): ...
async def __aenter__(self) -> Self: ... 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 # proxied from Session
identity_map: Any identity_map: Any
autoflush: Any autoflush: Any
@ -92,7 +95,9 @@ class _AsyncSessionContextManager:
def __init__(self, async_session) -> None: ... def __init__(self, async_session) -> None: ...
trans: Any trans: Any
async def __aenter__(self): ... 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): class AsyncSessionTransaction(ReversibleProxy, StartableContext):
session: Any session: Any
@ -104,7 +109,9 @@ class AsyncSessionTransaction(ReversibleProxy, StartableContext):
async def rollback(self) -> None: ... async def rollback(self) -> None: ...
async def commit(self) -> None: ... async def commit(self) -> None: ...
async def start(self, is_ctxmanager: bool = ...): ... 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_object_session(instance): ...
def async_session(session): ... def async_session(session): ...

View File

@ -1,3 +1,4 @@
from _typeshed import Unused
from logging import Logger from logging import Logger
from typing import Any, TypeVar, overload from typing import Any, TypeVar, overload
from typing_extensions import Literal, Self, TypeAlias from typing_extensions import Literal, Self, TypeAlias
@ -32,7 +33,7 @@ def instance_logger(instance: Identified, echoflag: _EchoFlag = ...) -> None: ..
class echo_property: class echo_property:
__doc__: str __doc__: str
@overload @overload
def __get__(self, instance: None, owner: object) -> Self: ... def __get__(self, instance: None, owner: Unused) -> Self: ...
@overload @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: ... def __set__(self, instance: Identified, value: _EchoFlag) -> None: ...

View File

@ -1,4 +1,4 @@
from _typeshed import Incomplete from _typeshed import Incomplete, Unused
from collections.abc import Callable from collections.abc import Callable
from typing import Any, ClassVar, TypeVar, overload from typing import Any, ClassVar, TypeVar, overload
from typing_extensions import TypeAlias 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: ... def has_inherited_table(cls: type[Any]) -> bool: ...
class DeclarativeMeta(type): 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 __setattr__(cls, key: str, value: Any) -> None: ...
def __delattr__(cls, key: str) -> None: ... def __delattr__(cls, key: str) -> None: ...

View File

@ -1,5 +1,6 @@
from _typeshed import Incomplete from _typeshed import Incomplete
from collections.abc import Mapping from collections.abc import Mapping
from types import TracebackType
from typing import Any, TypeVar, overload from typing import Any, TypeVar, overload
from typing_extensions import Self from typing_extensions import Self
@ -107,7 +108,9 @@ class Session(_SessionClassMethods):
) -> None: ... ) -> None: ...
connection_callable: Any connection_callable: Any
def __enter__(self) -> Self: ... 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 @property
def transaction(self): ... def transaction(self): ...
def in_transaction(self): ... def in_transaction(self): ...

View File

@ -1,5 +1,5 @@
import collections.abc import collections.abc
from _typeshed import Incomplete, SupportsKeysAndGetItem from _typeshed import Incomplete, SupportsKeysAndGetItem, Unused
from collections.abc import Callable, Iterable, Iterator, Mapping from collections.abc import Callable, Iterable, Iterator, Mapping
from typing import Any, Generic, NoReturn, TypeVar, overload from typing import Any, Generic, NoReturn, TypeVar, overload
from typing_extensions import Self from typing_extensions import Self
@ -16,9 +16,9 @@ collections_abc = collections.abc
EMPTY_SET: frozenset[Any] EMPTY_SET: frozenset[Any]
class ImmutableContainer: class ImmutableContainer:
def __delitem__(self, *arg: object, **kw: object) -> NoReturn: ... def __delitem__(self, *arg: Unused, **kw: Unused) -> NoReturn: ...
def __setitem__(self, *arg: object, **kw: object) -> NoReturn: ... def __setitem__(self, *arg: Unused, **kw: Unused) -> NoReturn: ...
def __setattr__(self, *arg: object, **kw: object) -> NoReturn: ... def __setattr__(self, *arg: Unused, **kw: Unused) -> NoReturn: ...
@overload @overload
def coerce_to_immutabledict(d: None) -> immutabledict[Any, Any]: ... def coerce_to_immutabledict(d: None) -> immutabledict[Any, Any]: ...

View File

@ -1,3 +1,4 @@
from types import TracebackType
from typing import Any from typing import Any
class _AsyncGeneratorContextManager: class _AsyncGeneratorContextManager:
@ -5,6 +6,8 @@ class _AsyncGeneratorContextManager:
__doc__: Any __doc__: Any
def __init__(self, func, args, kwds) -> None: ... def __init__(self, func, args, kwds) -> None: ...
async def __aenter__(self): ... 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): ... def asynccontextmanager(func): ...

View File

@ -1,4 +1,5 @@
import asyncio as asyncio import asyncio as asyncio
from _typeshed import Unused
from collections.abc import Callable, Coroutine from collections.abc import Callable, Coroutine
from typing import Any from typing import Any
@ -13,6 +14,6 @@ class AsyncAdaptedLock:
@memoized_property @memoized_property
def mutex(self): ... def mutex(self): ...
def __enter__(self): ... def __enter__(self): ...
def __exit__(self, *arg, **kw) -> None: ... def __exit__(self, *arg: Unused, **kw: Unused) -> None: ...
def get_event_loop(): ... def get_event_loop(): ...

View File

@ -5,7 +5,7 @@ import itertools
import operator import operator
import pickle as pickle import pickle as pickle
import threading as threading import threading as threading
from _typeshed import Incomplete from _typeshed import Incomplete, Unused
from abc import ABC as ABC from abc import ABC as ABC
from datetime import timezone as timezone from datetime import timezone as timezone
from functools import reduce as reduce from functools import reduce as reduce
@ -53,7 +53,7 @@ class nullcontext:
enter_result: Any enter_result: Any
def __init__(self, enter_result: Incomplete | None = ...) -> None: ... def __init__(self, enter_result: Incomplete | None = ...) -> None: ...
def __enter__(self): ... def __enter__(self): ...
def __exit__(self, *excinfo) -> None: ... def __exit__(self, *excinfo: Unused) -> None: ...
def inspect_getfullargspec(func): ... def inspect_getfullargspec(func): ...
def importlib_metadata_get(group): ... def importlib_metadata_get(group): ...

View File

@ -1,5 +1,6 @@
from _typeshed import Incomplete from _typeshed import Incomplete, Unused
from collections.abc import Callable from collections.abc import Callable
from types import TracebackType
from typing import Any, Generic, TypeVar, overload from typing import Any, Generic, TypeVar, overload
from typing_extensions import Self from typing_extensions import Self
@ -13,7 +14,9 @@ class safe_reraise:
warn_only: Any warn_only: Any
def __init__(self, warn_only: bool = ...) -> None: ... def __init__(self, warn_only: bool = ...) -> None: ...
def __enter__(self) -> 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 walk_subclasses(cls) -> None: ...
def string_or_unprintable(element): ... def string_or_unprintable(element): ...
@ -71,9 +74,9 @@ class memoized_property(Generic[_R]):
__name__: str __name__: str
def __init__(self, fget: Callable[..., _R], doc: str | None = ...) -> None: ... def __init__(self, fget: Callable[..., _R], doc: str | None = ...) -> None: ...
@overload @overload
def __get__(self, obj: None, cls: object) -> Self: ... def __get__(self, obj: None, cls: Unused) -> Self: ...
@overload @overload
def __get__(self, obj: object, cls: object) -> _R: ... def __get__(self, obj: object, cls: Unused) -> _R: ...
@classmethod @classmethod
def reset(cls, obj: object, name: str) -> None: ... def reset(cls, obj: object, name: str) -> None: ...
@ -86,9 +89,9 @@ class HasMemoized:
__name__: str __name__: str
def __init__(self, fget: Callable[..., _R], doc: str | None = ...) -> None: ... def __init__(self, fget: Callable[..., _R], doc: str | None = ...) -> None: ...
@overload @overload
def __get__(self, obj: None, cls: object) -> Self: ... def __get__(self, obj: None, cls: Unused) -> Self: ...
@overload @overload
def __get__(self, obj: object, cls: object) -> _R: ... def __get__(self, obj: object, cls: Unused) -> _R: ...
@classmethod @classmethod
def memoized_instancemethod(cls, fn): ... def memoized_instancemethod(cls, fn): ...

View File

@ -1,4 +1,5 @@
from _typeshed import Incomplete from _typeshed import Incomplete
from types import TracebackType
from .models.segment import SegmentContextManager as SegmentContextManager from .models.segment import SegmentContextManager as SegmentContextManager
from .models.subsegment import ( from .models.subsegment import (
@ -11,12 +12,16 @@ from .utils import stacktrace as stacktrace
class AsyncSegmentContextManager(SegmentContextManager): class AsyncSegmentContextManager(SegmentContextManager):
async def __aenter__(self): ... 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): class AsyncSubsegmentContextManager(SubsegmentContextManager):
async def __call__(self, wrapped, instance, args, kwargs): ... async def __call__(self, wrapped, instance, args, kwargs): ...
async def __aenter__(self): ... 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): class AsyncAWSXRayRecorder(AWSXRayRecorder):
def capture_async(self, name: Incomplete | None = ...): ... def capture_async(self, name: Incomplete | None = ...): ...

View File

@ -1,3 +1,4 @@
from types import TracebackType
from typing import Any from typing import Any
from ..exceptions.exceptions import SegmentNameMissingException as SegmentNameMissingException from ..exceptions.exceptions import SegmentNameMissingException as SegmentNameMissingException
@ -16,7 +17,9 @@ class SegmentContextManager:
segment: Segment segment: Segment
def __init__(self, recorder: AWSXRayRecorder, name: str | None = ..., **segment_kwargs) -> None: ... def __init__(self, recorder: AWSXRayRecorder, name: str | None = ..., **segment_kwargs) -> None: ...
def __enter__(self): ... 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): class Segment(Entity):
trace_id: str | None trace_id: str | None

View File

@ -1,5 +1,6 @@
import time import time
from _typeshed import Incomplete from _typeshed import Incomplete
from types import TracebackType
from typing import Any from typing import Any
from ...core import AWSXRayRecorder from ...core import AWSXRayRecorder
@ -21,7 +22,9 @@ class SubsegmentContextManager:
def __init__(self, recorder: AWSXRayRecorder, name: Incomplete | None = ..., **subsegment_kwargs) -> None: ... def __init__(self, recorder: AWSXRayRecorder, name: Incomplete | None = ..., **subsegment_kwargs) -> None: ...
def __call__(self, wrapped, instance, args: list[Any], kwargs: dict[str, Any]): ... def __call__(self, wrapped, instance, args: list[Any], kwargs: dict[str, Any]): ...
def __enter__(self) -> Subsegment: ... 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): class Subsegment(Entity):
parent_segment: Segment parent_segment: Segment

View File

@ -1,4 +1,4 @@
from _typeshed import IdentityFunction from _typeshed import IdentityFunction, Unused
from collections.abc import Callable, Iterator, MutableMapping, Sequence from collections.abc import Callable, Iterator, MutableMapping, Sequence
from contextlib import AbstractContextManager from contextlib import AbstractContextManager
from typing import Any, Generic, TypeVar, overload 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 __missing__(self, key: _KT) -> _VT: ...
def __iter__(self) -> Iterator[_KT]: ... def __iter__(self) -> Iterator[_KT]: ...
def __len__(self) -> int: ... def __len__(self) -> int: ...
@overload # type: ignore[override] @overload
def pop(self, key: _KT) -> _VT: ... def pop(self, key: _KT) -> _VT: ...
@overload @overload
def pop(self, key: _KT, default: _VT | _T) -> _VT | _T: ... 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 __init__(self, timer: Callable[[], float]) -> None: ...
def __call__(self) -> float: ... def __call__(self) -> float: ...
def __enter__(self) -> float: ... def __enter__(self) -> float: ...
def __exit__(self, *exc: object) -> None: ... def __exit__(self, *exc: Unused) -> None: ...
@property @property
def timer(self) -> _Timer: ... def timer(self) -> _Timer: ...

View File

@ -1,7 +1,8 @@
from _typeshed import Unused
from collections.abc import Hashable from collections.abc import Hashable
__all__ = ("hashkey", "methodkey", "typedkey") __all__ = ("hashkey", "methodkey", "typedkey")
def hashkey(*args: Hashable, **kwargs: Hashable) -> tuple[Hashable, ...]: ... 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, ...]: ... def typedkey(*args: Hashable, **kwargs: Hashable) -> tuple[Hashable, ...]: ...

View File

@ -1,4 +1,5 @@
from collections.abc import Iterable, Mapping from collections.abc import Iterable, Mapping
from types import TracebackType
from typing import Any from typing import Any
from typing_extensions import Self, TypeAlias from typing_extensions import Self, TypeAlias
from urllib.parse import ParseResult, SplitResult from urllib.parse import ParseResult, SplitResult
@ -50,7 +51,9 @@ class DAVClient:
ssl_cert: str | tuple[str, str] | None = ..., ssl_cert: str | tuple[str, str] | None = ...,
) -> None: ... ) -> None: ...
def __enter__(self) -> Self: ... 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 principal(self, *, url: str | ParseResult | SplitResult | URL | None = ...) -> Principal: ...
def calendar( def calendar(
self, self,

View File

@ -69,7 +69,7 @@ class _CDataBase:
def __dir__(self): ... def __dir__(self): ...
def __enter__(self): ... def __enter__(self): ...
def __eq__(self, other): ... 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 __float__(self) -> float: ...
def __ge__(self, other): ... def __ge__(self, other): ...
def __getitem__(self, index): ... def __getitem__(self, index): ...

View File

@ -1,5 +1,5 @@
import datetime import datetime
from _typeshed import ReadableBuffer from _typeshed import ReadableBuffer, Unused
from collections import OrderedDict from collections import OrderedDict
from collections.abc import Iterator from collections.abc import Iterator
from re import Match, Pattern from re import Match, Pattern
@ -121,7 +121,7 @@ class HashExpander:
range_end: int | None = None, range_end: int | None = None,
range_begin: int | None = None, range_begin: int | None = None,
) -> int: ... ) -> 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( def expand(
self, self,
efl: object, efl: object,

View File

@ -5,6 +5,7 @@ from _typeshed import (
OpenTextModeReading, OpenTextModeReading,
OpenTextModeWriting, OpenTextModeWriting,
SupportsWrite, SupportsWrite,
Unused,
) )
from re import Pattern from re import Pattern
from typing import Any, ClassVar from typing import Any, ClassVar
@ -88,7 +89,7 @@ class NullInput(Input):
class NullOutput(Output): class NullOutput(Output):
default_destination_path: ClassVar[str] default_destination_path: ClassVar[str]
def write(self, data: object) -> None: ... def write(self, data: Unused) -> None: ...
class DocTreeInput(Input): class DocTreeInput(Input):
default_source_path: ClassVar[str] default_source_path: ClassVar[str]

View File

@ -1,2 +1,5 @@
version = "2.6.1" version = "2.6.1"
requires = ["types-Pillow>=9.2.0"] requires = ["types-Pillow>=9.2.0"]
[tool.stubtest]
stubtest_requirements = ["cryptography"]

View File

@ -1,4 +1,4 @@
from _typeshed import Incomplete from _typeshed import Incomplete, Unused
from collections.abc import Callable from collections.abc import Callable
from html.parser import HTMLParser from html.parser import HTMLParser
from logging import Logger from logging import Logger
@ -68,7 +68,7 @@ class HTML2FPDF(HTMLParser):
ul_bullet_char: str = ..., ul_bullet_char: str = ...,
heading_sizes: Incomplete | None = None, heading_sizes: Incomplete | None = None,
warn_on_tags_not_matching: bool = True, warn_on_tags_not_matching: bool = True,
**_: object, **_: Unused,
): ... ): ...
def width2unit(self, length): ... def width2unit(self, length): ...
def handle_data(self, data) -> None: ... def handle_data(self, data) -> None: ...

View File

@ -1,4 +1,4 @@
from _typeshed import Incomplete from _typeshed import Incomplete, Unused
from collections import defaultdict from collections import defaultdict
from logging import Logger from logging import Logger
from typing_extensions import Final from typing_extensions import Final
@ -165,7 +165,7 @@ class PDFPagesRoot(PDFObject):
class PDFExtGState(PDFObject): class PDFExtGState(PDFObject):
def __init__(self, dict_as_str) -> None: ... 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): class PDFXrefAndTrailer(ContentWithoutID):
output_builder: Incomplete output_builder: Incomplete

View File

@ -1,4 +1,4 @@
from _typeshed import Incomplete from _typeshed import Incomplete, Unused
from collections import defaultdict from collections import defaultdict
from collections.abc import Generator, Iterable from collections.abc import Generator, Iterable
@ -8,7 +8,7 @@ from .syntax import PDFArray, PDFObject, PDFString
class NumberTree(PDFObject): class NumberTree(PDFObject):
nums: defaultdict[Incomplete, list[Incomplete]] nums: defaultdict[Incomplete, list[Incomplete]]
def __init__(self) -> None: ... 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): class StructTreeRoot(PDFObject):
type: str type: str

View File

@ -1,4 +1,5 @@
version = "2.1.*" version = "2.1.*"
[tool.stubtest] [tool.stubtest]
stubtest_requirements = ["protobuf==3.20.2"]
ignore_missing_stub = true ignore_missing_stub = true

View File

@ -1,4 +1,5 @@
import datetime import datetime
from _typeshed import Unused
from collections.abc import Callable, Iterable, Sequence from collections.abc import Callable, Iterable, Sequence
from typing import Any, NoReturn from typing import Any, NoReturn
from typing_extensions import Literal, Self, TypeAlias from typing_extensions import Literal, Self, TypeAlias
@ -77,7 +78,7 @@ class Property(ModelAttribute):
indexed: bool | None = ..., indexed: bool | None = ...,
repeated: bool | None = ..., repeated: bool | None = ...,
required: bool | None = ..., required: bool | None = ...,
default: object | None = ..., default: object = None,
choices: Iterable[object] | None = ..., choices: Iterable[object] | None = ...,
validator: Callable[[Property, Any], object] | None = ..., validator: Callable[[Property, Any], object] | None = ...,
verbose_name: str | None = ..., verbose_name: str | None = ...,
@ -153,7 +154,7 @@ class JsonProperty(BlobProperty):
indexed: bool | None = ..., indexed: bool | None = ...,
repeated: bool | None = ..., repeated: bool | None = ...,
required: bool | None = ..., required: bool | None = ...,
default: object | None = ..., default: object = None,
choices: Iterable[object] | None = ..., choices: Iterable[object] | None = ...,
validator: Callable[[Property, Any], object] | None = ..., validator: Callable[[Property, Any], object] | None = ...,
verbose_name: str | None = ..., verbose_name: str | None = ...,
@ -423,7 +424,7 @@ def get_multi_async(
memcache_timeout: int | None = ..., memcache_timeout: int | None = ...,
max_memcache_items: int | None = ..., max_memcache_items: int | None = ...,
force_writes: bool | None = ..., force_writes: bool | None = ...,
_options: object | None = ..., _options: object = None,
) -> list[type[tasklets_module.Future]]: ... ) -> list[type[tasklets_module.Future]]: ...
def get_multi( def get_multi(
keys: Sequence[type[key_module.Key]], keys: Sequence[type[key_module.Key]],
@ -441,7 +442,7 @@ def get_multi(
memcache_timeout: int | None = ..., memcache_timeout: int | None = ...,
max_memcache_items: int | None = ..., max_memcache_items: int | None = ...,
force_writes: bool | None = ..., force_writes: bool | None = ...,
_options: object | None = ..., _options: object = None,
) -> list[type[Model] | None]: ... ) -> list[type[Model] | None]: ...
def put_multi_async( def put_multi_async(
entities: list[type[Model]], entities: list[type[Model]],
@ -456,7 +457,7 @@ def put_multi_async(
memcache_timeout: int | None = ..., memcache_timeout: int | None = ...,
max_memcache_items: int | None = ..., max_memcache_items: int | None = ...,
force_writes: bool | None = ..., force_writes: bool | None = ...,
_options: object | None = ..., _options: object = None,
) -> list[tasklets_module.Future]: ... ) -> list[tasklets_module.Future]: ...
def put_multi( def put_multi(
entities: list[Model], entities: list[Model],
@ -471,7 +472,7 @@ def put_multi(
memcache_timeout: int | None = ..., memcache_timeout: int | None = ...,
max_memcache_items: int | None = ..., max_memcache_items: int | None = ...,
force_writes: bool | None = ..., force_writes: bool | None = ...,
_options: object | None = ..., _options: object = None,
) -> list[key_module.Key]: ... ) -> list[key_module.Key]: ...
def delete_multi_async( def delete_multi_async(
keys: list[key_module.Key], keys: list[key_module.Key],
@ -486,7 +487,7 @@ def delete_multi_async(
memcache_timeout: int | None = ..., memcache_timeout: int | None = ...,
max_memcache_items: int | None = ..., max_memcache_items: int | None = ...,
force_writes: bool | None = ..., force_writes: bool | None = ...,
_options: object | None = ..., _options: object = None,
) -> list[tasklets_module.Future]: ... ) -> list[tasklets_module.Future]: ...
def delete_multi( def delete_multi(
keys: Sequence[key_module.Key], keys: Sequence[key_module.Key],
@ -501,7 +502,7 @@ def delete_multi(
memcache_timeout: int | None = ..., memcache_timeout: int | None = ...,
max_memcache_items: int | None = ..., max_memcache_items: int | None = ...,
force_writes: bool | None = ..., force_writes: bool | None = ...,
_options: object | None = ..., _options: object = None,
) -> list[None]: ... ) -> list[None]: ...
def get_indexes_async(**options: object) -> NoReturn: ... def get_indexes_async(**options: Unused) -> NoReturn: ...
def get_indexes(**options: object) -> NoReturn: ... def get_indexes(**options: Unused) -> NoReturn: ...

View File

@ -1 +1,4 @@
version = "10.0.*" version = "10.0.*"
[tool.stubtest]
stubtest_requirements = ["docutils", "mock"]

View File

@ -65,7 +65,7 @@ class MockedProgram(CustomSearchPath):
program_signal_file: Any program_signal_file: Any
def __init__(self, name, returncode: int = ..., script: Incomplete | None = ...) -> None: ... def __init__(self, name, returncode: int = ..., script: Incomplete | None = ...) -> None: ...
def __enter__(self): ... def __enter__(self): ...
def __exit__(self, *args, **kw): ... def __exit__(self, *args: object, **kw: object): ...
class CaptureOutput(ContextManager): class CaptureOutput(ContextManager):
stdin: Any stdin: Any

View File

@ -3,3 +3,4 @@ requires = ["types-urllib3"]
[tool.stubtest] [tool.stubtest]
extras = ["extra"] extras = ["extra"]
stubtest_requirements = ["aiohttp"]

View File

@ -1,6 +1,7 @@
from _typeshed import Incomplete from _typeshed import Incomplete
from collections.abc import Generator from collections.abc import Generator
from enum import Enum from enum import Enum
from types import TracebackType
from typing_extensions import Self from typing_extensions import Self
from influxdb_client.client.flux_table import TableList from influxdb_client.client.flux_table import TableList
@ -46,9 +47,13 @@ class FluxCsvParser:
response_metadata_mode: FluxResponseMetadataMode = ..., response_metadata_mode: FluxResponseMetadataMode = ...,
) -> None: ... ) -> None: ...
def __enter__(self) -> Self: ... 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 __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(self) -> Generator[Incomplete, None, None]: ...
def generator_async(self): ... def generator_async(self): ...
def parse_record(self, table_index, table, csv): ... def parse_record(self, table_index, table, csv): ...

View File

@ -1,4 +1,5 @@
from _typeshed import Incomplete from _typeshed import Incomplete
from types import TracebackType
from typing_extensions import Self from typing_extensions import Self
from influxdb_client import HealthCheck, InvokableScriptsApi, Ready from influxdb_client import HealthCheck, InvokableScriptsApi, Ready
@ -43,7 +44,9 @@ class InfluxDBClient(_BaseClient):
profilers: Incomplete | None = ..., profilers: Incomplete | None = ...,
) -> None: ... ) -> None: ...
def __enter__(self) -> Self: ... 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 @classmethod
def from_config_file(cls, config_file: str = ..., debug: Incomplete | None = ..., enable_gzip: bool = ..., **kwargs): ... def from_config_file(cls, config_file: str = ..., debug: Incomplete | None = ..., enable_gzip: bool = ..., **kwargs): ...
@classmethod @classmethod

View File

@ -1,4 +1,5 @@
from _typeshed import Incomplete from _typeshed import Incomplete
from types import TracebackType
from typing_extensions import Self from typing_extensions import Self
from influxdb_client.client._base import _BaseClient from influxdb_client.client._base import _BaseClient
@ -37,7 +38,9 @@ class InfluxDBClientAsync(_BaseClient):
profilers: Incomplete | None = ..., profilers: Incomplete | None = ...,
) -> None: ... ) -> None: ...
async def __aenter__(self) -> Self: ... 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: ... async def close(self) -> None: ...
@classmethod @classmethod
def from_config_file(cls, config_file: str = ..., debug: Incomplete | None = ..., enable_gzip: bool = ..., **kwargs): ... def from_config_file(cls, config_file: str = ..., debug: Incomplete | None = ..., enable_gzip: bool = ..., **kwargs): ...

View File

@ -1,5 +1,6 @@
import multiprocessing import multiprocessing
from _typeshed import Incomplete from _typeshed import Incomplete
from types import TracebackType
logger: Incomplete logger: Incomplete
@ -18,5 +19,7 @@ class MultiprocessingWriter(multiprocessing.Process):
def start(self) -> None: ... def start(self) -> None: ...
def terminate(self) -> None: ... def terminate(self) -> None: ...
def __enter__(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 __del__(self) -> None: ... def __del__(self) -> None: ...

View File

@ -1,8 +1,10 @@
import logging
from _typeshed import Incomplete from _typeshed import Incomplete
from collections.abc import Iterable from collections.abc import Iterable
from enum import Enum from enum import Enum
from types import TracebackType
from typing import Any 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._base import _BaseWriteApi
from influxdb_client.client.write.point import Point from influxdb_client.client.write.point import Point
@ -12,7 +14,7 @@ _DataClass: TypeAlias = Any # any dataclass
_NamedTuple: TypeAlias = tuple[Any, ...] # any NamedTuple _NamedTuple: TypeAlias = tuple[Any, ...] # any NamedTuple
_Observable: TypeAlias = Any # reactivex.Observable _Observable: TypeAlias = Any # reactivex.Observable
logger: Incomplete logger: logging.Logger
class WriteType(Enum): class WriteType(Enum):
batching: int batching: int
@ -20,27 +22,29 @@ class WriteType(Enum):
synchronous: int synchronous: int
class WriteOptions: class WriteOptions:
write_type: Incomplete write_type: WriteType
batch_size: Incomplete batch_size: int
flush_interval: Incomplete flush_interval: int
jitter_interval: Incomplete jitter_interval: int
retry_interval: Incomplete retry_interval: int
max_retries: Incomplete max_retries: int
max_retry_delay: Incomplete max_retry_delay: int
max_retry_time: Incomplete max_retry_time: int
exponential_base: Incomplete exponential_base: int
write_scheduler: Incomplete write_scheduler: Incomplete
max_close_wait: int
def __init__( def __init__(
self, self,
write_type: WriteType = ..., write_type: WriteType = ...,
batch_size: int = ..., batch_size: int = 1_000,
flush_interval: int = ..., flush_interval: int = 1_000,
jitter_interval: int = ..., jitter_interval: int = 0,
retry_interval: int = ..., retry_interval: int = 5_000,
max_retries: int = ..., max_retries: int = 5,
max_retry_delay: int = ..., max_retry_delay: int = 125_000,
max_retry_time: int = ..., max_retry_time: int = 180_000,
exponential_base: int = ..., exponential_base: int = 2,
max_close_wait: int = 300_000,
write_scheduler=..., write_scheduler=...,
) -> None: ... ) -> None: ...
def to_retry_strategy(self, **kwargs): ... def to_retry_strategy(self, **kwargs): ...
@ -99,6 +103,8 @@ class WriteApi(_BaseWriteApi):
) -> Any: ... ) -> Any: ...
def flush(self) -> None: ... def flush(self) -> None: ...
def close(self) -> None: ... def close(self) -> None: ...
def __enter__(self): ... 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: ...
def __del__(self) -> None: ... def __del__(self) -> None: ...

View File

@ -1,4 +1,5 @@
from collections.abc import Iterable, Mapping from collections.abc import Iterable, Mapping
from types import TracebackType
from typing import Any, TextIO, overload from typing import Any, TextIO, overload
from typing_extensions import Literal, TypeAlias from typing_extensions import Literal, TypeAlias
@ -194,7 +195,9 @@ class Promise(Result):
def __init__(self, runner) -> None: ... def __init__(self, runner) -> None: ...
def join(self): ... def join(self): ...
def __enter__(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 normalize_hide(val, out_stream=..., err_stream=...): ...
def default_encoding() -> str: ... def default_encoding() -> str: ...

View File

@ -7,3 +7,4 @@ apt_dependencies = ["libkrb5-dev"]
# No need to install on the CI. Leaving here as information for MacOs/Windows contributors. # No need to install on the CI. Leaving here as information for MacOs/Windows contributors.
# brew_dependencies = ["krb5"] # brew_dependencies = ["krb5"]
# choco_dependencies = ["mitkerberos"] # choco_dependencies = ["mitkerberos"]
stubtest_requirements = ["gssapi"]

View File

@ -1,4 +1,4 @@
from _typeshed import Incomplete, IndexableBuffer, SliceableBuffer from _typeshed import Incomplete, IndexableBuffer, SliceableBuffer, Unused
from collections.abc import Callable, Mapping from collections.abc import Callable, Mapping
from typing import Any, TypeVar, overload from typing import Any, TypeVar, overload
from typing_extensions import Final, TypeAlias from typing_extensions import Final, TypeAlias
@ -7,7 +7,6 @@ from pyasn1.codec.ber.encoder import AbstractItemEncoder
# Use _typeshed._SupportsGetItemBuffer after PEP 688 # Use _typeshed._SupportsGetItemBuffer after PEP 688
_SupportsGetItemBuffer: TypeAlias = SliceableBuffer | IndexableBuffer _SupportsGetItemBuffer: TypeAlias = SliceableBuffer | IndexableBuffer
_Unused: TypeAlias = object
_R = TypeVar("_R") _R = TypeVar("_R")
_B = TypeVar("_B", bound=_SupportsGetItemBuffer) _B = TypeVar("_B", bound=_SupportsGetItemBuffer)
# The possible return type is a union of all other decode methods, ie: AnyOf[Incomplete | bool] # 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): class LDAPBooleanEncoder(AbstractItemEncoder):
supportIndefLenMode: bool supportIndefLenMode: bool
# Requires pyasn1 > 0.3.7 # 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 compute_ber_size(data): ...
def decode_message_fast(message): ... def decode_message_fast(message): ...
@ -28,13 +27,13 @@ def decode_sequence(message: _B, start: int, stop: int, context_decoders: Mappin
def decode_sequence( def decode_sequence(
message: _SupportsGetItemBuffer, start: int, stop: int, context_decoders: None = ... message: _SupportsGetItemBuffer, start: int, stop: int, context_decoders: None = ...
) -> _AllDecodersReturnType: ... ) -> _AllDecodersReturnType: ...
def decode_integer(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_octet_string(message, start: int, stop: int, context_decoders: Unused = ...): ...
def decode_boolean(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_bind_response(message, start: int, stop: int, context_decoders: Unused = ...): ...
def decode_extended_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_intermediate_response(message, start: int, stop: int, context_decoders: Unused = ...): ...
def decode_controls(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 ldap_result_to_dict_fast(response): ...
def get_byte(x): ... def get_byte(x): ...
def get_bytes(x): ... def get_bytes(x): ...

View File

@ -1,7 +1,7 @@
import abc import abc
import sys import sys
from _collections_abc import dict_items, dict_keys, dict_values 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 collections.abc import Mapping
from typing import Any, ClassVar, Generic, TypeVar, overload, type_check_only from typing import Any, ClassVar, Generic, TypeVar, overload, type_check_only
from typing_extensions import Never, Self from typing_extensions import Never, Self
@ -65,7 +65,7 @@ class NoReturn: ...
# a class decorator, but mypy does not support type[_T] for abstract # 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. # classes until this issue is resolved, https://github.com/python/mypy/issues/4717.
def trait(cls: _T) -> _T: ... 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]): ... class FlexibleAlias(Generic[_T, _U]): ...

View File

@ -29,7 +29,7 @@ class BaseCursor:
def __init__(self, connection) -> None: ... def __init__(self, connection) -> None: ...
def close(self) -> None: ... def close(self) -> None: ...
def __enter__(self): ... def __enter__(self): ...
def __exit__(self, *exc_info) -> None: ... def __exit__(self, *exc_info: object) -> None: ...
def nextset(self): ... def nextset(self): ...
def setinputsizes(self, *args) -> None: ... def setinputsizes(self, *args) -> None: ...
def setoutputsizes(self, *args) -> None: ... def setoutputsizes(self, *args) -> None: ...

View File

@ -1,3 +1,4 @@
from _typeshed import Unused
from datetime import date, datetime, time, timedelta from datetime import date, datetime, time, timedelta
from MySQLdb._mysql import string_literal as string_literal 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 TimeDelta_or_None(s: str) -> timedelta | None: ...
def Time_or_None(s: str) -> time | None: ... def Time_or_None(s: str) -> time | None: ...
def Date_or_None(s: str) -> date | None: ... def Date_or_None(s: str) -> date | None: ...
def DateTime2literal(d: datetime, c: object) -> str: ... def DateTime2literal(d: datetime, c: Unused) -> str: ...
def DateTimeDelta2literal(d: datetime, c: object) -> str: ... def DateTimeDelta2literal(d: datetime, c: Unused) -> str: ...

View File

@ -1,4 +1,4 @@
from _typeshed import Incomplete from _typeshed import Incomplete, Unused
from abc import abstractmethod from abc import abstractmethod
from collections.abc import Iterable, Iterator from collections.abc import Iterable, Iterator
from typing import SupportsInt, overload from typing import SupportsInt, overload
@ -133,7 +133,7 @@ class IPNetwork(BaseIP, IPListMixin):
def previous(self, step: int = ...) -> Self: ... def previous(self, step: int = ...) -> Self: ...
def next(self, step: int = ...) -> Self: ... def next(self, step: int = ...) -> Self: ...
def supernet(self, prefixlen: int = ...) -> list[IPNetwork]: ... 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]: ... def iter_hosts(self) -> Iterator[IPAddress]: ...
class IPRange(BaseIP, IPListMixin): class IPRange(BaseIP, IPListMixin):

View File

@ -1,3 +1,4 @@
from _typeshed import Unused
from collections.abc import Iterable, Sequence from collections.abc import Iterable, Sequence
from socket import AddressFamily from socket import AddressFamily
from typing_extensions import Literal from typing_extensions import Literal
@ -22,7 +23,7 @@ hostmask_to_prefix: dict[int, int]
def valid_str(addr: str, flags: int = ...) -> bool: ... def valid_str(addr: str, flags: int = ...) -> bool: ...
def str_to_int(addr: str, flags: int = ...) -> int: ... 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_arpa(int_val: int) -> str: ...
def int_to_packed(int_val: int) -> bytes: ... def int_to_packed(int_val: int) -> bytes: ...
def packed_to_int(packed_int: bytes) -> int: ... def packed_to_int(packed_int: bytes) -> int: ...

View File

@ -4,4 +4,4 @@ from .base import Client as Client
class BackendApplicationClient(Client): class BackendApplicationClient(Client):
grant_type: str 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): ...

View File

@ -5,6 +5,6 @@ from .base import Client as Client
class LegacyApplicationClient(Client): class LegacyApplicationClient(Client):
grant_type: str grant_type: str
def __init__(self, client_id, **kwargs) -> None: ... 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 self, username, password, body: str = ..., scope: Incomplete | None = ..., include_client_id: bool = ..., **kwargs
): ... ): ...

View File

@ -5,8 +5,8 @@ from .base import Client as Client
class MobileApplicationClient(Client): class MobileApplicationClient(Client):
response_type: str 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 self, uri, redirect_uri: Incomplete | None = ..., scope: Incomplete | None = ..., state: Incomplete | None = ..., **kwargs
): ... ): ...
token: Any 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 = ...): ...

View File

@ -18,7 +18,7 @@ class ServiceApplicationClient(Client):
audience: Incomplete | None = ..., audience: Incomplete | None = ...,
**kwargs, **kwargs,
) -> None: ... ) -> None: ...
def prepare_request_body( # type: ignore[override] def prepare_request_body(
self, self,
private_key: Incomplete | None = ..., private_key: Incomplete | None = ...,
subject: Incomplete | None = ..., subject: Incomplete | None = ...,

View File

@ -7,7 +7,7 @@ class WebApplicationClient(Client):
grant_type: str grant_type: str
code: Any code: Any
def __init__(self, client_id, code: Incomplete | None = ..., **kwargs) -> None: ... def __init__(self, client_id, code: Incomplete | None = ..., **kwargs) -> None: ...
def prepare_request_uri( # type: ignore[override] def prepare_request_uri(
self, self,
uri, uri,
redirect_uri: Incomplete | None = ..., redirect_uri: Incomplete | None = ...,
@ -17,7 +17,7 @@ class WebApplicationClient(Client):
code_challenge_method: str | None = ..., code_challenge_method: str | None = ...,
**kwargs, **kwargs,
): ... ): ...
def prepare_request_body( # type: ignore[override] def prepare_request_body(
self, self,
code: Incomplete | None = ..., code: Incomplete | None = ...,
redirect_uri: Incomplete | None = ..., redirect_uri: Incomplete | None = ...,
@ -26,4 +26,4 @@ class WebApplicationClient(Client):
code_verifier: str | None = ..., code_verifier: str | None = ...,
**kwargs, **kwargs,
): ... ): ...
def parse_request_uri_response(self, uri, state: Incomplete | None = ...): ... # type: ignore[override] def parse_request_uri_response(self, uri, state: Incomplete | None = ...): ...

View File

@ -1,6 +1,11 @@
from _typeshed import Incomplete 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.styles.styleable import StyleableObject
from openpyxl.worksheet.hyperlink import Hyperlink
from openpyxl.worksheet.worksheet import Worksheet
__docformat__: str __docformat__: str
TIME_TYPES: Incomplete TIME_TYPES: Incomplete
@ -19,60 +24,60 @@ TYPE_ERROR: str
TYPE_FORMULA_CACHE_STRING: str TYPE_FORMULA_CACHE_STRING: str
VALID_TYPES: Incomplete VALID_TYPES: Incomplete
def get_type(t, value): ... def get_type(t: type, value: object) -> str | None: ...
def get_time_format(t): ... def get_time_format(t: datetime) -> str: ...
class Cell(StyleableObject): class Cell(StyleableObject):
row: Incomplete row: int
column: Incomplete column: int
data_type: str data_type: str
def __init__( def __init__(
self, self,
worksheet, worksheet: Worksheet,
row: Incomplete | None = ..., row: int | None = ...,
column: Incomplete | None = ..., column: int | None = ...,
value: Incomplete | None = ..., value: str | float | datetime | None = ...,
style_array: Incomplete | None = ..., style_array: StyleArray | None = ...,
) -> None: ... ) -> None: ...
@property @property
def coordinate(self): ... def coordinate(self) -> str: ...
@property @property
def col_idx(self): ... def col_idx(self) -> int: ...
@property @property
def column_letter(self): ... def column_letter(self) -> str: ...
@property @property
def encoding(self): ... def encoding(self) -> str: ...
@property @property
def base_date(self): ... def base_date(self) -> datetime: ...
def check_string(self, value): ... def check_string(self, value: str): ...
def check_error(self, value): ... def check_error(self, value: object) -> str: ...
@property @property
def value(self): ... def value(self) -> str | float | datetime | None: ...
@value.setter @value.setter
def value(self, value) -> None: ... def value(self, value: str | float | datetime | None) -> None: ...
@property @property
def internal_value(self): ... def internal_value(self) -> str | float | datetime | None: ...
@property @property
def hyperlink(self): ... def hyperlink(self) -> Hyperlink | None: ...
@hyperlink.setter @hyperlink.setter
def hyperlink(self, val) -> None: ... def hyperlink(self, val: Hyperlink | str | None) -> None: ...
@property @property
def is_date(self): ... def is_date(self) -> bool: ...
def offset(self, row: int = ..., column: int = ...): ... def offset(self, row: int = ..., column: int = ...) -> Cell: ...
@property @property
def comment(self): ... def comment(self) -> Comment | None: ...
@comment.setter @comment.setter
def comment(self, value) -> None: ... def comment(self, value: Comment | None) -> None: ...
class MergedCell(StyleableObject): class MergedCell(StyleableObject):
data_type: str data_type: str
comment: Incomplete comment: Comment | None
hyperlink: Incomplete hyperlink: Hyperlink | None
row: Incomplete row: int
column: Incomplete column: int
def __init__(self, worksheet, row: Incomplete | None = ..., column: Incomplete | None = ...) -> None: ... def __init__(self, worksheet: Worksheet, row: int | None = ..., column: int | None = ...) -> None: ...
@property @property
def coordinate(self): ... def coordinate(self) -> str: ...
value: Incomplete 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