mirror of
https://github.com/microsoft/pyright.git
synced 2024-10-26 10:55:06 +03:00
Updated typeshed stubs to the latest version.
This commit is contained in:
parent
b9e72bf147
commit
252673152d
@ -1 +1 @@
|
||||
c661ac3ad6dc32d789e7458654dda49d095b2ba9
|
||||
8080e491d2fa92b1b1390c87fac23a1a38dcd919
|
||||
|
@ -2,12 +2,13 @@ import _typeshed
|
||||
import sys
|
||||
from _typeshed import SupportsWrite
|
||||
from collections.abc import Callable
|
||||
from typing import Any, Generic, TypeVar
|
||||
from typing_extensions import Literal
|
||||
from typing import Any, TypeVar
|
||||
from typing_extensions import Concatenate, Literal, ParamSpec
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_R_co = TypeVar("_R_co", covariant=True)
|
||||
_FuncT = TypeVar("_FuncT", bound=Callable[..., Any])
|
||||
_P = ParamSpec("_P")
|
||||
|
||||
# These definitions have special processing in mypy
|
||||
class ABCMeta(type):
|
||||
@ -28,13 +29,13 @@ class ABCMeta(type):
|
||||
|
||||
def abstractmethod(funcobj: _FuncT) -> _FuncT: ...
|
||||
|
||||
class abstractclassmethod(classmethod[_R_co], Generic[_R_co]):
|
||||
class abstractclassmethod(classmethod[_T, _P, _R_co]):
|
||||
__isabstractmethod__: Literal[True]
|
||||
def __init__(self: abstractclassmethod[_R_co], callable: Callable[..., _R_co]) -> None: ...
|
||||
def __init__(self, callable: Callable[Concatenate[_T, _P], _R_co]) -> None: ...
|
||||
|
||||
class abstractstaticmethod(staticmethod[_R_co], Generic[_R_co]):
|
||||
class abstractstaticmethod(staticmethod[_P, _R_co]):
|
||||
__isabstractmethod__: Literal[True]
|
||||
def __init__(self, callable: Callable[..., _R_co]) -> None: ...
|
||||
def __init__(self, callable: Callable[_P, _R_co]) -> None: ...
|
||||
|
||||
class abstractproperty(property):
|
||||
__isabstractmethod__: Literal[True]
|
||||
|
@ -54,7 +54,7 @@ from typing import ( # noqa: Y022
|
||||
overload,
|
||||
type_check_only,
|
||||
)
|
||||
from typing_extensions import Literal, LiteralString, Self, SupportsIndex, TypeAlias, TypeGuard, final
|
||||
from typing_extensions import Concatenate, Literal, LiteralString, ParamSpec, Self, SupportsIndex, TypeAlias, TypeGuard, final
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
@ -75,6 +75,7 @@ _SupportsNextT = TypeVar("_SupportsNextT", bound=SupportsNext[Any], covariant=Tr
|
||||
_SupportsAnextT = TypeVar("_SupportsAnextT", bound=SupportsAnext[Any], covariant=True)
|
||||
_AwaitableT = TypeVar("_AwaitableT", bound=Awaitable[Any])
|
||||
_AwaitableT_co = TypeVar("_AwaitableT_co", bound=Awaitable[Any], covariant=True)
|
||||
_P = ParamSpec("_P")
|
||||
|
||||
class object:
|
||||
__doc__: str | None
|
||||
@ -113,32 +114,32 @@ class object:
|
||||
@classmethod
|
||||
def __subclasshook__(cls, __subclass: type) -> bool: ...
|
||||
|
||||
class staticmethod(Generic[_R_co]):
|
||||
class staticmethod(Generic[_P, _R_co]):
|
||||
@property
|
||||
def __func__(self) -> Callable[..., _R_co]: ...
|
||||
def __func__(self) -> Callable[_P, _R_co]: ...
|
||||
@property
|
||||
def __isabstractmethod__(self) -> bool: ...
|
||||
def __init__(self: staticmethod[_R_co], __f: Callable[..., _R_co]) -> None: ...
|
||||
def __get__(self, __instance: _T, __owner: type[_T] | None = None) -> Callable[..., _R_co]: ...
|
||||
def __init__(self, __f: Callable[_P, _R_co]) -> None: ...
|
||||
def __get__(self, __instance: _T, __owner: type[_T] | None = None) -> Callable[_P, _R_co]: ...
|
||||
if sys.version_info >= (3, 10):
|
||||
__name__: str
|
||||
__qualname__: str
|
||||
@property
|
||||
def __wrapped__(self) -> Callable[..., _R_co]: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> _R_co: ...
|
||||
def __wrapped__(self) -> Callable[_P, _R_co]: ...
|
||||
def __call__(self, *args: _P.args, **kwargs: _P.kwargs) -> _R_co: ...
|
||||
|
||||
class classmethod(Generic[_R_co]):
|
||||
class classmethod(Generic[_T, _P, _R_co]):
|
||||
@property
|
||||
def __func__(self) -> Callable[..., _R_co]: ...
|
||||
def __func__(self) -> Callable[Concatenate[_T, _P], _R_co]: ...
|
||||
@property
|
||||
def __isabstractmethod__(self) -> bool: ...
|
||||
def __init__(self: classmethod[_R_co], __f: Callable[..., _R_co]) -> None: ...
|
||||
def __get__(self, __instance: _T, __owner: type[_T] | None = None) -> Callable[..., _R_co]: ...
|
||||
def __init__(self, __f: Callable[Concatenate[_T, _P], _R_co]) -> None: ...
|
||||
def __get__(self, __instance: _T, __owner: type[_T] | None = None) -> Callable[_P, _R_co]: ...
|
||||
if sys.version_info >= (3, 10):
|
||||
__name__: str
|
||||
__qualname__: str
|
||||
@property
|
||||
def __wrapped__(self) -> Callable[..., _R_co]: ...
|
||||
def __wrapped__(self) -> Callable[Concatenate[_T, _P], _R_co]: ...
|
||||
|
||||
class type:
|
||||
@property
|
||||
|
@ -272,8 +272,9 @@ class StreamRecoder(BinaryIO):
|
||||
def readlines(self, sizehint: int | None = None) -> list[bytes]: ...
|
||||
def __next__(self) -> bytes: ...
|
||||
def __iter__(self) -> Self: ...
|
||||
# Base class accepts more types than just bytes
|
||||
def write(self, data: bytes) -> None: ... # type: ignore[override]
|
||||
def writelines(self, list: Iterable[bytes]) -> None: ...
|
||||
def writelines(self, list: Iterable[bytes]) -> None: ... # type: ignore[override]
|
||||
def reset(self) -> None: ...
|
||||
def __getattr__(self, name: str) -> Any: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
|
@ -5,6 +5,7 @@ from distutils.dist import Distribution
|
||||
from typing import Any
|
||||
|
||||
class Command:
|
||||
distribution: Distribution
|
||||
sub_commands: list[tuple[str, Callable[[Command], bool] | None]]
|
||||
def __init__(self, dist: Distribution) -> None: ...
|
||||
@abstractmethod
|
||||
|
@ -43,8 +43,8 @@ class build_ext(Command):
|
||||
def build_extension(self, ext) -> None: ...
|
||||
def swig_sources(self, sources, extension): ...
|
||||
def find_swig(self): ...
|
||||
def get_ext_fullpath(self, ext_name): ...
|
||||
def get_ext_fullname(self, ext_name): ...
|
||||
def get_ext_filename(self, ext_name): ...
|
||||
def get_ext_fullpath(self, ext_name: str) -> str: ...
|
||||
def get_ext_fullname(self, ext_name: str) -> str: ...
|
||||
def get_ext_filename(self, ext_name: str) -> str: ...
|
||||
def get_export_symbols(self, ext): ...
|
||||
def get_libraries(self, ext): ...
|
||||
|
@ -2,10 +2,14 @@ from _typeshed import FileDescriptorOrPath, Incomplete, SupportsWrite
|
||||
from collections.abc import Iterable, Mapping
|
||||
from distutils.cmd import Command
|
||||
from re import Pattern
|
||||
from typing import IO, Any
|
||||
from typing import IO, Any, ClassVar, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
command_re: Pattern[str]
|
||||
|
||||
_OptionsList: TypeAlias = list[tuple[str, str | None, str, int] | tuple[str, str | None, str]]
|
||||
_CommandT = TypeVar("_CommandT", bound=Command)
|
||||
|
||||
class DistributionMetadata:
|
||||
def __init__(self, path: FileDescriptorOrPath | None = None) -> None: ...
|
||||
name: str | None
|
||||
@ -59,22 +63,22 @@ class Distribution:
|
||||
def __init__(self, attrs: Mapping[str, Any] | None = None) -> None: ...
|
||||
def get_option_dict(self, command: str) -> dict[str, tuple[str, str]]: ...
|
||||
def parse_config_files(self, filenames: Iterable[str] | None = None) -> None: ...
|
||||
def get_command_obj(self, command: str, create: bool = ...) -> Command | None: ...
|
||||
global_options: Incomplete
|
||||
common_usage: str
|
||||
display_options: Incomplete
|
||||
display_option_names: Incomplete
|
||||
negative_opt: Incomplete
|
||||
def get_command_obj(self, command: str, create: bool = True) -> Command | None: ...
|
||||
global_options: ClassVar[_OptionsList]
|
||||
common_usage: ClassVar[str]
|
||||
display_options: ClassVar[_OptionsList]
|
||||
display_option_names: ClassVar[list[str]]
|
||||
negative_opt: ClassVar[dict[str, str]]
|
||||
verbose: int
|
||||
dry_run: int
|
||||
help: int
|
||||
command_packages: Incomplete
|
||||
script_name: Incomplete
|
||||
script_args: Incomplete
|
||||
command_options: Incomplete
|
||||
dist_files: Incomplete
|
||||
command_packages: list[str] | None
|
||||
script_name: str | None
|
||||
script_args: list[str] | None
|
||||
command_options: dict[str, dict[str, tuple[str, str]]]
|
||||
dist_files: list[tuple[str, str, str]]
|
||||
packages: Incomplete
|
||||
package_data: Incomplete
|
||||
package_data: dict[str, list[str]]
|
||||
package_dir: Incomplete
|
||||
py_modules: Incomplete
|
||||
libraries: Incomplete
|
||||
@ -101,16 +105,42 @@ class Distribution:
|
||||
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 get_command_class(self, command: str) -> type[Command]: ...
|
||||
@overload
|
||||
def reinitialize_command(self, command: str, reinit_subcommands: bool = False) -> Command: ...
|
||||
@overload
|
||||
def reinitialize_command(self, command: _CommandT, reinit_subcommands: bool = False) -> _CommandT: ...
|
||||
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): ...
|
||||
def run_command(self, command: str) -> None: ...
|
||||
def has_pure_modules(self) -> bool: ...
|
||||
def has_ext_modules(self) -> bool: ...
|
||||
def has_c_libraries(self) -> bool: ...
|
||||
def has_modules(self) -> bool: ...
|
||||
def has_headers(self) -> bool: ...
|
||||
def has_scripts(self) -> bool: ...
|
||||
def has_data_files(self) -> bool: ...
|
||||
def is_pure(self) -> bool: ...
|
||||
|
||||
# Getter methods generated in __init__
|
||||
def get_name(self) -> str: ...
|
||||
def get_version(self) -> str: ...
|
||||
def get_fullname(self) -> str: ...
|
||||
def get_author(self) -> str: ...
|
||||
def get_author_email(self) -> str: ...
|
||||
def get_maintainer(self) -> str: ...
|
||||
def get_maintainer_email(self) -> str: ...
|
||||
def get_contact(self) -> str: ...
|
||||
def get_contact_email(self) -> str: ...
|
||||
def get_url(self) -> str: ...
|
||||
def get_license(self) -> str: ...
|
||||
def get_licence(self) -> str: ...
|
||||
def get_description(self) -> str: ...
|
||||
def get_long_description(self) -> str: ...
|
||||
def get_keywords(self) -> str | list[str]: ...
|
||||
def get_platforms(self) -> str | list[str]: ...
|
||||
def get_classifiers(self) -> str | list[str]: ...
|
||||
def get_download_url(self) -> str: ...
|
||||
def get_requires(self) -> list[str]: ...
|
||||
def get_provides(self) -> list[str]: ...
|
||||
def get_obsoletes(self) -> list[str]: ...
|
||||
|
@ -101,7 +101,7 @@ class HTTPMessage(email.message.Message):
|
||||
|
||||
def parse_headers(fp: io.BufferedIOBase, _class: Callable[[], email.message.Message] = ...) -> HTTPMessage: ...
|
||||
|
||||
class HTTPResponse(io.BufferedIOBase, BinaryIO):
|
||||
class HTTPResponse(io.BufferedIOBase, BinaryIO): # type: ignore[misc] # incompatible method definitions in the base classes
|
||||
msg: HTTPMessage
|
||||
headers: HTTPMessage
|
||||
version: int
|
||||
|
@ -161,12 +161,20 @@ TPFLAGS_IS_ABSTRACT: Literal[1048576]
|
||||
|
||||
modulesbyfile: dict[str, Any]
|
||||
|
||||
_GetMembersPredicateTypeGuard: TypeAlias = Callable[[Any], TypeGuard[_T]]
|
||||
_GetMembersPredicate: TypeAlias = Callable[[Any], bool]
|
||||
_GetMembersReturnTypeGuard: TypeAlias = list[tuple[str, _T]]
|
||||
_GetMembersReturn: TypeAlias = list[tuple[str, Any]]
|
||||
|
||||
@overload
|
||||
def getmembers(object: object, predicate: _GetMembersPredicateTypeGuard[_T]) -> _GetMembersReturnTypeGuard[_T]: ...
|
||||
@overload
|
||||
def getmembers(object: object, predicate: _GetMembersPredicate | None = None) -> _GetMembersReturn: ...
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
@overload
|
||||
def getmembers_static(object: object, predicate: _GetMembersPredicateTypeGuard[_T]) -> _GetMembersReturnTypeGuard[_T]: ...
|
||||
@overload
|
||||
def getmembers_static(object: object, predicate: _GetMembersPredicate | None = None) -> _GetMembersReturn: ...
|
||||
|
||||
def getmodulename(path: str) -> str | None: ...
|
||||
|
@ -90,7 +90,7 @@ class BufferedIOBase(IOBase):
|
||||
def read(self, __size: int | None = ...) -> bytes: ...
|
||||
def read1(self, __size: int = ...) -> bytes: ...
|
||||
|
||||
class FileIO(RawIOBase, BinaryIO):
|
||||
class FileIO(RawIOBase, BinaryIO): # type: ignore[misc] # incompatible definitions of writelines in the base classes
|
||||
mode: str
|
||||
name: FileDescriptorOrPath # type: ignore[assignment]
|
||||
def __init__(
|
||||
@ -102,7 +102,7 @@ class FileIO(RawIOBase, BinaryIO):
|
||||
def read(self, __size: int = -1) -> bytes: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
|
||||
class BytesIO(BufferedIOBase, BinaryIO):
|
||||
class BytesIO(BufferedIOBase, BinaryIO): # type: ignore[misc] # incompatible definitions of methods in the base classes
|
||||
def __init__(self, initial_bytes: ReadableBuffer = ...) -> None: ...
|
||||
# BytesIO does not contain a "name" field. This workaround is necessary
|
||||
# to allow BytesIO sub-classes to add this field, as it is defined
|
||||
@ -113,17 +113,17 @@ class BytesIO(BufferedIOBase, BinaryIO):
|
||||
def getbuffer(self) -> memoryview: ...
|
||||
def read1(self, __size: int | None = -1) -> bytes: ...
|
||||
|
||||
class BufferedReader(BufferedIOBase, BinaryIO):
|
||||
class BufferedReader(BufferedIOBase, BinaryIO): # type: ignore[misc] # incompatible definitions of methods in the base classes
|
||||
def __enter__(self) -> Self: ...
|
||||
def __init__(self, raw: RawIOBase, buffer_size: int = ...) -> None: ...
|
||||
def peek(self, __size: int = 0) -> bytes: ...
|
||||
|
||||
class BufferedWriter(BufferedIOBase, BinaryIO):
|
||||
class BufferedWriter(BufferedIOBase, BinaryIO): # type: ignore[misc] # incompatible definitions of writelines in the base classes
|
||||
def __enter__(self) -> Self: ...
|
||||
def __init__(self, raw: RawIOBase, buffer_size: int = ...) -> None: ...
|
||||
def write(self, __buffer: ReadableBuffer) -> int: ...
|
||||
|
||||
class BufferedRandom(BufferedReader, BufferedWriter):
|
||||
class BufferedRandom(BufferedReader, BufferedWriter): # type: ignore[misc] # incompatible definitions of methods in the base classes
|
||||
def __enter__(self) -> Self: ...
|
||||
def seek(self, __target: int, __whence: int = 0) -> int: ... # stubtest needs this
|
||||
|
||||
@ -144,7 +144,7 @@ class TextIOBase(IOBase):
|
||||
def readlines(self, __hint: int = -1) -> list[str]: ... # type: ignore[override]
|
||||
def read(self, __size: int | None = ...) -> str: ...
|
||||
|
||||
class TextIOWrapper(TextIOBase, TextIO):
|
||||
class TextIOWrapper(TextIOBase, TextIO): # type: ignore[misc] # incompatible definitions of write in the base classes
|
||||
def __init__(
|
||||
self,
|
||||
buffer: IO[bytes],
|
||||
|
@ -104,7 +104,7 @@ class LZMACompressor:
|
||||
|
||||
class LZMAError(Exception): ...
|
||||
|
||||
class LZMAFile(io.BufferedIOBase, IO[bytes]):
|
||||
class LZMAFile(io.BufferedIOBase, IO[bytes]): # type: ignore[misc] # incompatible definitions of writelines in the base classes
|
||||
def __init__(
|
||||
self,
|
||||
filename: _PathOrFile | None = None,
|
||||
|
@ -40,7 +40,7 @@ class ErrorDuringImport(Exception):
|
||||
def __init__(self, filename: str, exc_info: OptExcInfo) -> None: ...
|
||||
|
||||
def importfile(path: str) -> ModuleType: ...
|
||||
def safeimport(path: str, forceload: bool = ..., cache: MutableMapping[str, ModuleType] = ...) -> ModuleType: ...
|
||||
def safeimport(path: str, forceload: bool = ..., cache: MutableMapping[str, ModuleType] = ...) -> ModuleType | None: ...
|
||||
|
||||
class Doc:
|
||||
PYTHONDOCS: str
|
||||
|
@ -53,6 +53,8 @@ class Signals(IntEnum):
|
||||
SIGPWR: int
|
||||
SIGRTMAX: int
|
||||
SIGRTMIN: int
|
||||
if sys.version_info >= (3, 11):
|
||||
SIGSTKFLT: int
|
||||
|
||||
class Handlers(IntEnum):
|
||||
SIG_DFL: int
|
||||
@ -147,6 +149,8 @@ else:
|
||||
SIGPWR: Signals
|
||||
SIGRTMAX: Signals
|
||||
SIGRTMIN: Signals
|
||||
if sys.version_info >= (3, 11):
|
||||
SIGSTKFLT: Signals
|
||||
@final
|
||||
class struct_siginfo(structseq[int], tuple[int, int, int, int, int, int, int]):
|
||||
if sys.version_info >= (3, 10):
|
||||
|
@ -1,6 +1,6 @@
|
||||
import io
|
||||
import sys
|
||||
from _typeshed import BytesPath, GenericPath, StrPath, WriteableBuffer
|
||||
from _typeshed import BytesPath, GenericPath, ReadableBuffer, StrPath, WriteableBuffer
|
||||
from collections.abc import Iterable, Iterator
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, AnyStr, Generic, overload
|
||||
@ -215,7 +215,17 @@ class _TemporaryFileWrapper(Generic[AnyStr], IO[AnyStr]):
|
||||
def tell(self) -> int: ...
|
||||
def truncate(self, size: int | None = ...) -> int: ...
|
||||
def writable(self) -> bool: ...
|
||||
@overload
|
||||
def write(self: _TemporaryFileWrapper[str], s: str) -> int: ...
|
||||
@overload
|
||||
def write(self: _TemporaryFileWrapper[bytes], s: ReadableBuffer) -> int: ...
|
||||
@overload
|
||||
def write(self, s: AnyStr) -> int: ...
|
||||
@overload
|
||||
def writelines(self: _TemporaryFileWrapper[str], lines: Iterable[str]) -> None: ...
|
||||
@overload
|
||||
def writelines(self: _TemporaryFileWrapper[bytes], lines: Iterable[ReadableBuffer]) -> None: ...
|
||||
@overload
|
||||
def writelines(self, lines: Iterable[AnyStr]) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
@ -392,8 +402,18 @@ class SpooledTemporaryFile(IO[AnyStr], _SpooledTemporaryFileBase):
|
||||
def seek(self, offset: int, whence: int = ...) -> int: ...
|
||||
def tell(self) -> int: ...
|
||||
def truncate(self, size: int | None = None) -> None: ... # type: ignore[override]
|
||||
@overload
|
||||
def write(self: SpooledTemporaryFile[str], s: str) -> int: ...
|
||||
@overload
|
||||
def write(self: SpooledTemporaryFile[bytes], s: ReadableBuffer) -> int: ...
|
||||
@overload
|
||||
def write(self, s: AnyStr) -> int: ...
|
||||
def writelines(self, iterable: Iterable[AnyStr]) -> None: ... # type: ignore[override]
|
||||
@overload
|
||||
def writelines(self: SpooledTemporaryFile[str], iterable: Iterable[str]) -> None: ...
|
||||
@overload
|
||||
def writelines(self: SpooledTemporaryFile[bytes], iterable: Iterable[ReadableBuffer]) -> None: ...
|
||||
@overload
|
||||
def writelines(self, iterable: Iterable[AnyStr]) -> None: ...
|
||||
def __iter__(self) -> Iterator[AnyStr]: ... # type: ignore[override]
|
||||
# These exist at runtime only on 3.11+.
|
||||
def readable(self) -> bool: ...
|
||||
|
@ -2,7 +2,7 @@ import collections # Needed by aliases like DefaultDict, see mypy issue 2986
|
||||
import sys
|
||||
import typing_extensions
|
||||
from _collections_abc import dict_items, dict_keys, dict_values
|
||||
from _typeshed import IdentityFunction, Incomplete, SupportsKeysAndGetItem
|
||||
from _typeshed import IdentityFunction, Incomplete, ReadableBuffer, SupportsKeysAndGetItem
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from contextlib import AbstractAsyncContextManager, AbstractContextManager
|
||||
from re import Match as Match, Pattern as Pattern
|
||||
@ -687,8 +687,22 @@ class IO(Iterator[AnyStr], Generic[AnyStr]):
|
||||
@abstractmethod
|
||||
def writable(self) -> bool: ...
|
||||
@abstractmethod
|
||||
@overload
|
||||
def write(self: IO[str], __s: str) -> int: ...
|
||||
@abstractmethod
|
||||
@overload
|
||||
def write(self: IO[bytes], __s: ReadableBuffer) -> int: ...
|
||||
@abstractmethod
|
||||
@overload
|
||||
def write(self, __s: AnyStr) -> int: ...
|
||||
@abstractmethod
|
||||
@overload
|
||||
def writelines(self: IO[str], __lines: Iterable[str]) -> None: ...
|
||||
@abstractmethod
|
||||
@overload
|
||||
def writelines(self: IO[bytes], __lines: Iterable[ReadableBuffer]) -> None: ...
|
||||
@abstractmethod
|
||||
@overload
|
||||
def writelines(self, __lines: Iterable[AnyStr]) -> None: ...
|
||||
@abstractmethod
|
||||
def __next__(self) -> AnyStr: ...
|
||||
|
@ -1,11 +1,23 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Iterable, Iterator
|
||||
from typing import Any, overload
|
||||
|
||||
class BaseRow:
|
||||
def __init__(self, parent, processors, keymap, key_style, data) -> None: ...
|
||||
def __reduce__(self): ...
|
||||
def __iter__(self): ...
|
||||
def __init__(
|
||||
self,
|
||||
__parent,
|
||||
__processors: Iterable[Callable[[Any], Any]] | None,
|
||||
__keymap: dict[Incomplete, Incomplete],
|
||||
__key_style: int,
|
||||
__row: Iterable[Any],
|
||||
) -> None: ...
|
||||
def __reduce__(self) -> tuple[Incomplete, tuple[Incomplete, Incomplete]]: ...
|
||||
def __iter__(self) -> Iterator[Any]: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __hash__(self) -> int: ...
|
||||
__getitem__: Any
|
||||
@overload
|
||||
def __getitem__(self, __key: str | int) -> tuple[Any, ...]: ...
|
||||
@overload
|
||||
def __getitem__(self, __key: slice) -> tuple[tuple[Any, ...]]: ...
|
||||
|
||||
def safe_rowproxy_reconstructor(__cls, __state): ...
|
||||
|
@ -1,9 +1,10 @@
|
||||
import abc
|
||||
from collections.abc import ItemsView, KeysView, Mapping, Sequence, ValuesView
|
||||
from typing import Any
|
||||
from collections.abc import ItemsView, Iterator, KeysView, Mapping, Sequence, ValuesView
|
||||
from typing import Any, Generic, TypeVar
|
||||
|
||||
from ..cresultproxy import BaseRow as BaseRow
|
||||
|
||||
_VT_co = TypeVar("_VT_co", covariant=True)
|
||||
|
||||
MD_INDEX: int
|
||||
|
||||
def rowproxy_reconstructor(cls, state): ...
|
||||
@ -13,45 +14,48 @@ KEY_OBJECTS_ONLY: int
|
||||
KEY_OBJECTS_BUT_WARN: int
|
||||
KEY_OBJECTS_NO_WARN: int
|
||||
|
||||
class Row(BaseRow, Sequence[Any], metaclass=abc.ABCMeta):
|
||||
class Row(BaseRow, Sequence[Any]):
|
||||
# The count and index methods are inherited from Sequence.
|
||||
# If the result set contains columns with the same names, these
|
||||
# fields contains their respective values, instead. We don't reflect
|
||||
# this in the stubs.
|
||||
__hash__ = BaseRow.__hash__ # type: ignore[assignment]
|
||||
def __lt__(self, other: Row | tuple[Any, ...]) -> bool: ...
|
||||
def __le__(self, other: Row | tuple[Any, ...]) -> bool: ...
|
||||
def __ge__(self, other: Row | tuple[Any, ...]) -> bool: ...
|
||||
def __gt__(self, other: Row | tuple[Any, ...]) -> bool: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
def keys(self) -> list[str]: ...
|
||||
# The following methods are public, but have a leading underscore
|
||||
# to prevent conflicts with column names.
|
||||
@property
|
||||
def count(self): ...
|
||||
def _mapping(self) -> RowMapping: ...
|
||||
@property
|
||||
def index(self): ...
|
||||
def __contains__(self, key): ...
|
||||
__hash__ = BaseRow.__hash__
|
||||
def __lt__(self, other): ...
|
||||
def __le__(self, other): ...
|
||||
def __ge__(self, other): ...
|
||||
def __gt__(self, other): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def keys(self): ...
|
||||
def _fields(self) -> tuple[str, ...]: ...
|
||||
def _asdict(self) -> dict[str, Any]: ...
|
||||
|
||||
class LegacyRow(Row, metaclass=abc.ABCMeta):
|
||||
def __contains__(self, key): ...
|
||||
def has_key(self, key): ...
|
||||
def items(self): ...
|
||||
def iterkeys(self): ...
|
||||
def itervalues(self): ...
|
||||
def values(self): ...
|
||||
class LegacyRow(Row):
|
||||
def has_key(self, key: str) -> bool: ...
|
||||
def items(self) -> list[tuple[str, Any]]: ...
|
||||
def iterkeys(self) -> Iterator[str]: ...
|
||||
def itervalues(self) -> Iterator[Any]: ...
|
||||
def values(self) -> list[Any]: ...
|
||||
|
||||
BaseRowProxy = BaseRow
|
||||
RowProxy = Row
|
||||
|
||||
class ROMappingView(KeysView[Any], ValuesView[Any], ItemsView[Any, Any]):
|
||||
def __init__(self, mapping, items) -> None: ...
|
||||
class ROMappingView(KeysView[str], ValuesView[_VT_co], ItemsView[str, _VT_co], Generic[_VT_co]): # type: ignore[misc]
|
||||
def __init__(self, mapping: RowMapping, items: list[_VT_co]) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self): ...
|
||||
def __contains__(self, item): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def __iter__(self) -> Iterator[_VT_co]: ... # type: ignore[override]
|
||||
def __eq__(self, other: ROMappingView[_VT_co]) -> bool: ... # type: ignore[override]
|
||||
def __ne__(self, other: ROMappingView[_VT_co]) -> bool: ... # type: ignore[override]
|
||||
|
||||
class RowMapping(BaseRow, Mapping[Any, Any]):
|
||||
class RowMapping(BaseRow, Mapping[str, Row]):
|
||||
__getitem__: Any
|
||||
def __iter__(self): ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __contains__(self, key): ...
|
||||
def items(self): ...
|
||||
def keys(self): ...
|
||||
def values(self): ...
|
||||
def items(self) -> ROMappingView[tuple[str, Any]]: ... # type: ignore[override]
|
||||
def keys(self) -> list[str]: ... # type: ignore[override]
|
||||
def values(self) -> ROMappingView[Any]: ... # type: ignore[override]
|
||||
|
@ -1,4 +1,4 @@
|
||||
version = "22.1.*"
|
||||
version = "23.1.*"
|
||||
|
||||
[tool.stubtest]
|
||||
# linux and darwin are equivalent
|
||||
|
@ -1,2 +1,10 @@
|
||||
from . import tempfile as tempfile
|
||||
from .threadpool import open as open
|
||||
from .threadpool import (
|
||||
open as open,
|
||||
stderr as stderr,
|
||||
stderr_bytes as stderr_bytes,
|
||||
stdin as stdin,
|
||||
stdin_bytes as stdin_bytes,
|
||||
stdout as stdout,
|
||||
stdout_bytes as stdout_bytes,
|
||||
)
|
||||
|
@ -1,6 +1,6 @@
|
||||
from collections.abc import Coroutine, Generator, Iterator
|
||||
from collections.abc import Callable, Coroutine, Generator, Iterator
|
||||
from types import CodeType, FrameType, TracebackType, coroutine
|
||||
from typing import Any, Generic, TypeVar
|
||||
from typing import Any, BinaryIO, Generic, TextIO, TypeVar
|
||||
from typing_extensions import Self
|
||||
|
||||
_T = TypeVar("_T")
|
||||
@ -13,6 +13,9 @@ class AsyncBase(Generic[_T]):
|
||||
def __aiter__(self) -> Self: ...
|
||||
async def __anext__(self) -> _T: ...
|
||||
|
||||
class AsyncIndirectBase(AsyncBase[_T]):
|
||||
def __init__(self, name: str, loop: Any, executor: Any, indirect: Callable[[], TextIO | BinaryIO]) -> None: ...
|
||||
|
||||
class AiofilesContextManager(Generic[_T_co, _T_contra, _V_co]):
|
||||
def __init__(self, coro: Coroutine[_T_co, _T_contra, _V_co]) -> None: ...
|
||||
def send(self, value: _T_contra) -> _T_co: ...
|
||||
|
@ -38,8 +38,6 @@ class AsyncSpooledTemporaryFile(AsyncBase[_T]):
|
||||
def name(self) -> str: ...
|
||||
@property
|
||||
def newlines(self) -> str: ...
|
||||
@property
|
||||
def softspace(self) -> bool: ...
|
||||
# Both should work with `AnyStr`, like in `tempfile`:
|
||||
async def write(self, s: Incomplete) -> int: ...
|
||||
async def writelines(self, iterable: Iterable[Incomplete]) -> None: ...
|
||||
|
@ -13,8 +13,8 @@ from typing import overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
|
||||
from ..base import AiofilesContextManager
|
||||
from .binary import AsyncBufferedIOBase, AsyncBufferedReader, AsyncFileIO, _UnknownAsyncBinaryIO
|
||||
from .text import AsyncTextIOWrapper
|
||||
from .binary import AsyncBufferedIOBase, AsyncBufferedReader, AsyncFileIO, AsyncIndirectBufferedIOBase, _UnknownAsyncBinaryIO
|
||||
from .text import AsyncTextIndirectIOWrapper, AsyncTextIOWrapper
|
||||
|
||||
_Opener: TypeAlias = Callable[[str, int], int]
|
||||
|
||||
@ -97,3 +97,10 @@ def open(
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
) -> AiofilesContextManager[None, None, _UnknownAsyncBinaryIO]: ...
|
||||
|
||||
stdin: AsyncTextIndirectIOWrapper
|
||||
stdout: AsyncTextIndirectIOWrapper
|
||||
stderr: AsyncTextIndirectIOWrapper
|
||||
stdin_bytes: AsyncIndirectBufferedIOBase
|
||||
stdout_bytes: AsyncIndirectBufferedIOBase
|
||||
stderr_bytes: AsyncIndirectBufferedIOBase
|
||||
|
@ -2,8 +2,10 @@ from _typeshed import FileDescriptorOrPath, ReadableBuffer, WriteableBuffer
|
||||
from collections.abc import Iterable
|
||||
from io import FileIO
|
||||
|
||||
from ..base import AsyncBase
|
||||
from ..base import AsyncBase, AsyncIndirectBase
|
||||
|
||||
# This class does not exist at runtime and instead these methods are
|
||||
# all dynamically patched in.
|
||||
class _UnknownAsyncBinaryIO(AsyncBase[bytes]):
|
||||
async def close(self) -> None: ...
|
||||
async def flush(self) -> None: ...
|
||||
@ -34,8 +36,20 @@ class AsyncBufferedIOBase(_UnknownAsyncBinaryIO):
|
||||
@property
|
||||
def raw(self) -> FileIO: ...
|
||||
|
||||
class AsyncIndirectBufferedIOBase(AsyncIndirectBase[bytes], _UnknownAsyncBinaryIO):
|
||||
async def read1(self, __size: int = ...) -> bytes: ...
|
||||
def detach(self) -> FileIO: ...
|
||||
@property
|
||||
def raw(self) -> FileIO: ...
|
||||
|
||||
class AsyncBufferedReader(AsyncBufferedIOBase):
|
||||
async def peek(self, __size: int = ...) -> bytes: ...
|
||||
|
||||
class AsyncIndirectBufferedReader(AsyncIndirectBufferedIOBase):
|
||||
async def peek(self, __size: int = ...) -> bytes: ...
|
||||
|
||||
class AsyncFileIO(_UnknownAsyncBinaryIO):
|
||||
async def readall(self) -> bytes: ...
|
||||
|
||||
class AsyncIndirectFileIO(AsyncIndirectBase[bytes], _UnknownAsyncBinaryIO):
|
||||
async def readall(self) -> bytes: ...
|
||||
|
@ -2,9 +2,9 @@ from _typeshed import FileDescriptorOrPath
|
||||
from collections.abc import Iterable
|
||||
from typing import BinaryIO
|
||||
|
||||
from ..base import AsyncBase
|
||||
from ..base import AsyncBase, AsyncIndirectBase
|
||||
|
||||
class AsyncTextIOWrapper(AsyncBase[str]):
|
||||
class _UnknownAsyncTextIO(AsyncBase[str]):
|
||||
async def close(self) -> None: ...
|
||||
async def flush(self) -> None: ...
|
||||
async def isatty(self) -> bool: ...
|
||||
@ -37,3 +37,6 @@ class AsyncTextIOWrapper(AsyncBase[str]):
|
||||
def name(self) -> FileDescriptorOrPath: ...
|
||||
@property
|
||||
def mode(self) -> str: ...
|
||||
|
||||
class AsyncTextIOWrapper(_UnknownAsyncTextIO): ...
|
||||
class AsyncTextIndirectIOWrapper(AsyncIndirectBase[str], _UnknownAsyncTextIO): ...
|
||||
|
@ -1 +0,0 @@
|
||||
version = "1.4.*"
|
@ -1,57 +0,0 @@
|
||||
from typing_extensions import Literal
|
||||
|
||||
__version_info__: tuple[int, int, int]
|
||||
PY3: Literal[True]
|
||||
unicode = str
|
||||
system: str
|
||||
|
||||
def user_data_dir(
|
||||
appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., roaming: bool = ...
|
||||
) -> str: ...
|
||||
def site_data_dir(
|
||||
appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., multipath: bool = ...
|
||||
) -> str: ...
|
||||
def user_config_dir(
|
||||
appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., roaming: bool = ...
|
||||
) -> str: ...
|
||||
def site_config_dir(
|
||||
appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., multipath: bool = ...
|
||||
) -> str: ...
|
||||
def user_cache_dir(
|
||||
appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., opinion: bool = ...
|
||||
) -> str: ...
|
||||
def user_state_dir(
|
||||
appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., roaming: bool = ...
|
||||
) -> str: ...
|
||||
def user_log_dir(
|
||||
appname: str | None = ..., appauthor: str | None = ..., version: str | None = ..., opinion: bool = ...
|
||||
) -> str: ...
|
||||
|
||||
class AppDirs:
|
||||
appname: str
|
||||
appauthor: str
|
||||
version: str
|
||||
roaming: bool
|
||||
multipath: bool
|
||||
def __init__(
|
||||
self,
|
||||
appname: str | None = ...,
|
||||
appauthor: str | None = ...,
|
||||
version: str | None = ...,
|
||||
roaming: bool = ...,
|
||||
multipath: bool = ...,
|
||||
) -> None: ...
|
||||
@property
|
||||
def user_data_dir(self) -> str: ...
|
||||
@property
|
||||
def site_data_dir(self) -> str: ...
|
||||
@property
|
||||
def user_config_dir(self) -> str: ...
|
||||
@property
|
||||
def site_config_dir(self) -> str: ...
|
||||
@property
|
||||
def user_cache_dir(self) -> str: ...
|
||||
@property
|
||||
def user_state_dir(self) -> str: ...
|
||||
@property
|
||||
def user_log_dir(self) -> str: ...
|
@ -1 +0,0 @@
|
||||
version = "3.7.*"
|
@ -1,4 +0,0 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
# Explicitly mark this package as incomplete.
|
||||
def __getattr__(name: str) -> Incomplete: ...
|
@ -1,5 +0,0 @@
|
||||
from ssl import _PeerCertRetDictType
|
||||
|
||||
class CertificateError(ValueError): ...
|
||||
|
||||
def match_hostname(cert: _PeerCertRetDictType, hostname: str) -> None: ...
|
@ -20,7 +20,7 @@ class ConsoleMenu:
|
||||
exit_item: ExitItem
|
||||
current_option: int
|
||||
selected_option: int
|
||||
returned_value: object | None
|
||||
returned_value: object
|
||||
should_exit: bool
|
||||
previous_active_menu: ConsoleMenu | None
|
||||
def __init__(
|
||||
|
@ -1,4 +1,4 @@
|
||||
version = "23.2.13"
|
||||
version = "23.3.12"
|
||||
|
||||
[tool.stubtest]
|
||||
ignore_missing_stub = true
|
||||
|
@ -3,7 +3,7 @@ extra_description = """\
|
||||
Type hints for GDB's \
|
||||
[Python API](https://sourceware.org/gdb/onlinedocs/gdb/Python-API.html). \
|
||||
Note that this API is available only when running Python scripts under GDB: \
|
||||
is is not possible to install the `gdb` package separately, for instance \
|
||||
it is not possible to install the `gdb` package separately, for instance \
|
||||
using `pip`.\
|
||||
"""
|
||||
|
||||
|
@ -1,61 +1,67 @@
|
||||
from _typeshed import Incomplete
|
||||
from ...common import Request
|
||||
|
||||
class RequestValidator:
|
||||
def __init__(self) -> None: ...
|
||||
@property
|
||||
def allowed_signature_methods(self): ...
|
||||
def allowed_signature_methods(self) -> tuple[str, ...]: ...
|
||||
@property
|
||||
def safe_characters(self): ...
|
||||
def safe_characters(self) -> set[str]: ...
|
||||
@property
|
||||
def client_key_length(self): ...
|
||||
def client_key_length(self) -> tuple[int, int]: ...
|
||||
@property
|
||||
def request_token_length(self): ...
|
||||
def request_token_length(self) -> tuple[int, int]: ...
|
||||
@property
|
||||
def access_token_length(self): ...
|
||||
def access_token_length(self) -> tuple[int, int]: ...
|
||||
@property
|
||||
def timestamp_lifetime(self): ...
|
||||
def timestamp_lifetime(self) -> int: ...
|
||||
@property
|
||||
def nonce_length(self): ...
|
||||
def nonce_length(self) -> tuple[int, int]: ...
|
||||
@property
|
||||
def verifier_length(self): ...
|
||||
def verifier_length(self) -> tuple[int, int]: ...
|
||||
@property
|
||||
def realms(self): ...
|
||||
def realms(self) -> list[str]: ...
|
||||
@property
|
||||
def enforce_ssl(self): ...
|
||||
def check_client_key(self, client_key): ...
|
||||
def check_request_token(self, request_token): ...
|
||||
def check_access_token(self, request_token): ...
|
||||
def check_nonce(self, nonce): ...
|
||||
def check_verifier(self, verifier): ...
|
||||
def check_realms(self, realms): ...
|
||||
def enforce_ssl(self) -> bool: ...
|
||||
def check_client_key(self, client_key: str) -> bool: ...
|
||||
def check_request_token(self, request_token: str) -> bool: ...
|
||||
def check_access_token(self, request_token: str) -> bool: ...
|
||||
def check_nonce(self, nonce: str) -> bool: ...
|
||||
def check_verifier(self, verifier: str) -> bool: ...
|
||||
def check_realms(self, realms: list[str]) -> bool: ...
|
||||
@property
|
||||
def dummy_client(self) -> None: ...
|
||||
def dummy_client(self) -> str: ...
|
||||
@property
|
||||
def dummy_request_token(self) -> None: ...
|
||||
def dummy_request_token(self) -> str: ...
|
||||
@property
|
||||
def dummy_access_token(self) -> None: ...
|
||||
def get_client_secret(self, client_key, request) -> None: ...
|
||||
def get_request_token_secret(self, client_key, token, request) -> None: ...
|
||||
def get_access_token_secret(self, client_key, token, request) -> None: ...
|
||||
def get_default_realms(self, client_key, request) -> None: ...
|
||||
def get_realms(self, token, request) -> None: ...
|
||||
def get_redirect_uri(self, token, request) -> None: ...
|
||||
def get_rsa_key(self, client_key, request) -> None: ...
|
||||
def invalidate_request_token(self, client_key, request_token, request) -> None: ...
|
||||
def validate_client_key(self, client_key, request) -> None: ...
|
||||
def validate_request_token(self, client_key, token, request) -> None: ...
|
||||
def validate_access_token(self, client_key, token, request) -> None: ...
|
||||
def dummy_access_token(self) -> str: ...
|
||||
def get_client_secret(self, client_key: str, request: Request) -> str: ...
|
||||
def get_request_token_secret(self, client_key: str, token: str, request: Request) -> str: ...
|
||||
def get_access_token_secret(self, client_key: str, token: str, request: Request) -> str: ...
|
||||
def get_default_realms(self, client_key: str, request: Request) -> list[str]: ...
|
||||
def get_realms(self, token: str, request: Request) -> list[str]: ...
|
||||
def get_redirect_uri(self, token: str, request: Request) -> str: ...
|
||||
def get_rsa_key(self, client_key: str, request: Request) -> str: ...
|
||||
def invalidate_request_token(self, client_key: str, request_token: str, request: Request) -> None: ...
|
||||
def validate_client_key(self, client_key: str, request: Request) -> bool: ...
|
||||
def validate_request_token(self, client_key: str, token: str, request: Request) -> bool: ...
|
||||
def validate_access_token(self, client_key: str, token: str, request: Request) -> bool: ...
|
||||
def validate_timestamp_and_nonce(
|
||||
self, client_key, timestamp, nonce, request, request_token: Incomplete | None = ..., access_token: Incomplete | None = ...
|
||||
) -> None: ...
|
||||
def validate_redirect_uri(self, client_key, redirect_uri, request) -> None: ...
|
||||
def validate_requested_realms(self, client_key, realms, request) -> None: ...
|
||||
self,
|
||||
client_key: str,
|
||||
timestamp,
|
||||
nonce: str,
|
||||
request: Request,
|
||||
request_token: str | None = None,
|
||||
access_token: str | None = None,
|
||||
) -> bool: ...
|
||||
def validate_redirect_uri(self, client_key: str, redirect_uri, request: Request) -> bool: ...
|
||||
def validate_requested_realms(self, client_key: str, realms: list[str], request: Request) -> bool: ...
|
||||
def validate_realms(
|
||||
self, client_key, token, request, uri: Incomplete | None = ..., realms: Incomplete | None = ...
|
||||
) -> None: ...
|
||||
def validate_verifier(self, client_key, token, verifier, request) -> None: ...
|
||||
def verify_request_token(self, token, request) -> None: ...
|
||||
def verify_realms(self, token, realms, request) -> None: ...
|
||||
def save_access_token(self, token, request) -> None: ...
|
||||
def save_request_token(self, token, request) -> None: ...
|
||||
def save_verifier(self, token, verifier, request) -> None: ...
|
||||
self, client_key: str, token: str, request: Request, uri: str | None = None, realms: list[str] | None = None
|
||||
) -> bool: ...
|
||||
def validate_verifier(self, client_key: str, token: str, verifier: str, request: Request) -> bool: ...
|
||||
def verify_request_token(self, token: str, request: Request) -> bool: ...
|
||||
def verify_realms(self, token: str, realms: list[str], request: Request) -> bool: ...
|
||||
def save_access_token(self, token: str, request: Request) -> None: ...
|
||||
def save_request_token(self, token: str, request: Request) -> None: ...
|
||||
def save_verifier(self, token: str, verifier, request: Request) -> None: ...
|
||||
|
@ -1,4 +1,4 @@
|
||||
version = "3.0.*"
|
||||
version = "3.1.*"
|
||||
|
||||
[tool.stubtest]
|
||||
ignore_missing_stub = true
|
||||
|
@ -21,7 +21,6 @@ class Drawing:
|
||||
def height(self): ...
|
||||
@height.setter
|
||||
def height(self, h) -> None: ...
|
||||
def set_dimension(self, w: int = ..., h: int = ...) -> None: ...
|
||||
def get_emu_dimensions(self): ...
|
||||
def set_dimension(self, w: int = 0, h: int = 0) -> None: ...
|
||||
@property
|
||||
def anchor(self): ...
|
||||
|
@ -84,5 +84,3 @@ class WorkbookPackage(Serialisable):
|
||||
def to_tree(self): ...
|
||||
@property
|
||||
def active(self): ...
|
||||
@property
|
||||
def pivot_caches(self): ...
|
||||
|
@ -1,27 +1,38 @@
|
||||
from _typeshed import Incomplete, StrPath, SupportsRead
|
||||
from zipfile import ZipFile
|
||||
|
||||
from openpyxl.chartsheet.chartsheet import Chartsheet
|
||||
from openpyxl.packaging.manifest import Manifest
|
||||
from openpyxl.packaging.relationship import Relationship
|
||||
from openpyxl.workbook.workbook import Workbook
|
||||
from openpyxl.reader.workbook import WorkbookParser
|
||||
from openpyxl.workbook import Workbook
|
||||
|
||||
SUPPORTED_FORMATS: Incomplete
|
||||
|
||||
class ExcelReader:
|
||||
archive: Incomplete
|
||||
valid_files: Incomplete
|
||||
read_only: Incomplete
|
||||
keep_vba: Incomplete
|
||||
data_only: Incomplete
|
||||
keep_links: Incomplete
|
||||
shared_strings: Incomplete
|
||||
archive: ZipFile
|
||||
valid_files: list[str]
|
||||
read_only: bool
|
||||
keep_vba: bool
|
||||
data_only: bool
|
||||
keep_links: bool
|
||||
rich_text: bool
|
||||
shared_strings: list[Incomplete]
|
||||
package: Manifest # defined after call to read_manifest()
|
||||
parser: WorkbookParser # defined after call to read_workbook()
|
||||
wb: Workbook # defined after call to read_workbook()
|
||||
|
||||
def __init__(
|
||||
self, fn: SupportsRead[bytes] | str, read_only: bool = ..., keep_vba=..., data_only: bool = ..., keep_links: bool = ...
|
||||
self,
|
||||
fn: SupportsRead[bytes] | str,
|
||||
read_only: bool = False,
|
||||
keep_vba: bool = False,
|
||||
data_only: bool = False,
|
||||
keep_links: bool = True,
|
||||
rich_text: bool = False,
|
||||
) -> None: ...
|
||||
package: Incomplete
|
||||
def read_manifest(self) -> None: ...
|
||||
def read_strings(self) -> None: ...
|
||||
parser: Incomplete
|
||||
wb: Incomplete
|
||||
def read_workbook(self) -> None: ...
|
||||
def read_properties(self) -> None: ...
|
||||
def read_theme(self) -> None: ...
|
||||
@ -31,8 +42,9 @@ class ExcelReader:
|
||||
|
||||
def load_workbook(
|
||||
filename: SupportsRead[bytes] | StrPath,
|
||||
read_only: bool = ...,
|
||||
keep_vba: bool = ...,
|
||||
data_only: bool = ...,
|
||||
keep_links: bool = ...,
|
||||
read_only: bool = False,
|
||||
keep_vba: bool = False,
|
||||
data_only: bool = False,
|
||||
keep_links: bool = True,
|
||||
rich_text: bool = False,
|
||||
) -> Workbook: ...
|
||||
|
@ -1,10 +1,12 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
|
||||
from openpyxl.workbook import Workbook
|
||||
|
||||
class WorkbookParser:
|
||||
archive: Incomplete
|
||||
workbook_part_name: Incomplete
|
||||
wb: Incomplete
|
||||
wb: Workbook
|
||||
keep_links: Incomplete
|
||||
sheets: Incomplete
|
||||
def __init__(self, archive, workbook_part_name, keep_links: bool = ...) -> None: ...
|
||||
|
@ -1,15 +1,13 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections import defaultdict
|
||||
from collections.abc import Generator
|
||||
from re import Pattern
|
||||
|
||||
from openpyxl.descriptors import Sequence
|
||||
from openpyxl.descriptors.serialisable import Serialisable
|
||||
|
||||
RESERVED: Incomplete
|
||||
RESERVED_REGEX: Incomplete
|
||||
COL_RANGE: str
|
||||
COL_RANGE_RE: Incomplete
|
||||
ROW_RANGE: str
|
||||
ROW_RANGE_RE: Incomplete
|
||||
TITLES_REGEX: Incomplete
|
||||
RESERVED: frozenset[str]
|
||||
RESERVED_REGEX: Pattern[str]
|
||||
|
||||
class DefinedName(Serialisable):
|
||||
tagname: str
|
||||
@ -59,15 +57,12 @@ class DefinedName(Serialisable):
|
||||
def is_external(self): ...
|
||||
def __iter__(self): ...
|
||||
|
||||
class DefinedNameDict(dict[str, DefinedName]):
|
||||
def add(self, value: DefinedName) -> None: ...
|
||||
|
||||
class DefinedNameList(Serialisable):
|
||||
tagname: str
|
||||
definedName: Incomplete
|
||||
definedName: Sequence
|
||||
def __init__(self, definedName=...) -> None: ...
|
||||
def append(self, defn) -> None: ...
|
||||
def by_sheet(self) -> defaultdict[int, DefinedNameDict]: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __contains__(self, name): ...
|
||||
def __getitem__(self, name): ...
|
||||
def get(self, name, scope: Incomplete | None = ...): ...
|
||||
def __delitem__(self, name) -> None: ...
|
||||
def delete(self, name, scope: Incomplete | None = ...): ...
|
||||
def localnames(self, scope): ...
|
||||
|
@ -6,7 +6,6 @@ from typing import IO
|
||||
from openpyxl.chartsheet.chartsheet import Chartsheet
|
||||
from openpyxl.styles.named_styles import NamedStyle
|
||||
from openpyxl.workbook.child import _WorkbookChild
|
||||
from openpyxl.workbook.defined_name import DefinedName
|
||||
from openpyxl.worksheet._write_only import WriteOnlyWorksheet
|
||||
from openpyxl.worksheet.worksheet import Worksheet
|
||||
|
||||
@ -70,10 +69,6 @@ class Workbook:
|
||||
def add_named_style(self, style: NamedStyle) -> None: ...
|
||||
@property
|
||||
def named_styles(self) -> list[str]: ...
|
||||
def get_named_ranges(self) -> list[DefinedName] | tuple[DefinedName, ...]: ...
|
||||
def add_named_range(self, named_range: DefinedName) -> None: ...
|
||||
def get_named_range(self, name: str) -> DefinedName: ...
|
||||
def remove_named_range(self, named_range: DefinedName) -> None: ...
|
||||
@property
|
||||
def mime_type(self) -> str: ...
|
||||
def save(self, filename: StrPath | IO[bytes]) -> None: ...
|
||||
|
@ -1,5 +1,11 @@
|
||||
import datetime
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from collections.abc import Container, Generator
|
||||
|
||||
from .hyperlink import HyperlinkList
|
||||
from .pagebreak import ColBreak, RowBreak
|
||||
from .protection import SheetProtection
|
||||
from .table import TablePartList
|
||||
|
||||
CELL_TAG: Incomplete
|
||||
VALUE_TAG: Incomplete
|
||||
@ -31,39 +37,48 @@ DIMENSION_TAG: Incomplete
|
||||
CUSTOM_VIEWS_TAG: Incomplete
|
||||
|
||||
class WorkSheetParser:
|
||||
min_row: Incomplete
|
||||
epoch: Incomplete
|
||||
min_row: Incomplete | None
|
||||
min_col: Incomplete | None
|
||||
epoch: datetime.datetime
|
||||
source: Incomplete
|
||||
shared_strings: Incomplete
|
||||
data_only: Incomplete
|
||||
shared_formulae: Incomplete
|
||||
array_formulae: Incomplete
|
||||
data_only: bool
|
||||
shared_formulae: dict[Incomplete, Incomplete]
|
||||
row_counter: int
|
||||
tables: Incomplete
|
||||
date_formats: Incomplete
|
||||
timedelta_formats: Incomplete
|
||||
row_dimensions: Incomplete
|
||||
column_dimensions: Incomplete
|
||||
number_formats: Incomplete
|
||||
col_counter: int
|
||||
tables: TablePartList
|
||||
date_formats: Container[Incomplete]
|
||||
timedelta_formats: Container[Incomplete]
|
||||
row_dimensions: dict[Incomplete, Incomplete]
|
||||
column_dimensions: dict[Incomplete, Incomplete]
|
||||
number_formats: list[Incomplete]
|
||||
keep_vba: bool
|
||||
hyperlinks: Incomplete
|
||||
formatting: Incomplete
|
||||
legacy_drawing: Incomplete
|
||||
merged_cells: Incomplete
|
||||
row_breaks: Incomplete
|
||||
col_breaks: Incomplete
|
||||
hyperlinks: HyperlinkList
|
||||
formatting: list[Incomplete]
|
||||
legacy_drawing: Incomplete | None
|
||||
merged_cells: Incomplete | None
|
||||
row_breaks: RowBreak
|
||||
col_breaks: ColBreak
|
||||
rich_text: bool
|
||||
protection: SheetProtection # initialized after call to parse_sheet_protection()
|
||||
|
||||
def __init__(
|
||||
self, src, shared_strings, data_only: bool = ..., epoch=..., date_formats=..., timedelta_formats=...
|
||||
self,
|
||||
src,
|
||||
shared_strings,
|
||||
data_only: bool = False,
|
||||
epoch: datetime.datetime = ...,
|
||||
date_formats: Container[Incomplete] = ...,
|
||||
timedelta_formats: Container[Incomplete] = ...,
|
||||
rich_text: bool = False,
|
||||
) -> None: ...
|
||||
def parse(self) -> Generator[Incomplete, None, None]: ...
|
||||
def parse_dimensions(self): ...
|
||||
col_counter: Incomplete
|
||||
def parse_cell(self, element): ...
|
||||
def parse_formula(self, element): ...
|
||||
def parse_column_dimensions(self, col) -> None: ...
|
||||
def parse_row(self, row): ...
|
||||
def parse_formatting(self, element) -> None: ...
|
||||
protection: Incomplete
|
||||
def parse_sheet_protection(self, element) -> None: ...
|
||||
def parse_extensions(self, element) -> None: ...
|
||||
def parse_legacy(self, element) -> None: ...
|
||||
@ -75,7 +90,7 @@ class WorksheetReader:
|
||||
ws: Incomplete
|
||||
parser: Incomplete
|
||||
tables: Incomplete
|
||||
def __init__(self, ws, xml_source, shared_strings, data_only) -> None: ...
|
||||
def __init__(self, ws, xml_source, shared_strings, data_only, rich_text: bool) -> None: ...
|
||||
def bind_cells(self) -> None: ...
|
||||
def bind_formatting(self) -> None: ...
|
||||
def bind_tables(self) -> None: ...
|
||||
|
@ -0,0 +1,37 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterator
|
||||
from typing import ClassVar
|
||||
|
||||
class DataTableFormula:
|
||||
t: ClassVar[str]
|
||||
|
||||
ref: Incomplete
|
||||
ca: bool
|
||||
dt2D: bool
|
||||
dtr: bool
|
||||
r1: Incomplete | None
|
||||
r2: Incomplete | None
|
||||
del1: bool
|
||||
del2: bool
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
ref,
|
||||
ca: bool = False,
|
||||
dt2D: bool = False,
|
||||
dtr: bool = False,
|
||||
r1: Incomplete | None = None,
|
||||
r2: Incomplete | None = None,
|
||||
del1: bool = False,
|
||||
del2: bool = False,
|
||||
**kw,
|
||||
) -> None: ...
|
||||
def __iter__(self) -> Iterator[tuple[str, str]]: ...
|
||||
|
||||
class ArrayFormula:
|
||||
t: ClassVar[str]
|
||||
ref: Incomplete
|
||||
text: Incomplete | None
|
||||
|
||||
def __init__(self, ref, text: Incomplete | None = None) -> None: ...
|
||||
def __iter__(self) -> Iterator[tuple[str, str]]: ...
|
@ -9,7 +9,6 @@ from openpyxl.workbook.child import _WorkbookChild
|
||||
from openpyxl.workbook.workbook import Workbook
|
||||
from openpyxl.worksheet.cell_range import CellRange
|
||||
from openpyxl.worksheet.datavalidation import DataValidation
|
||||
from openpyxl.worksheet.pagebreak import ColBreak, RowBreak
|
||||
from openpyxl.worksheet.table import Table, TableList
|
||||
from openpyxl.worksheet.views import SheetView
|
||||
|
||||
@ -42,14 +41,10 @@ class Worksheet(_WorkbookChild):
|
||||
@property
|
||||
def active_cell(self) -> Cell: ...
|
||||
@property
|
||||
def page_breaks(self) -> tuple[RowBreak, ColBreak]: ...
|
||||
def array_formulae(self) -> dict[Incomplete, Incomplete]: ...
|
||||
@property
|
||||
def show_gridlines(self) -> bool: ...
|
||||
@property
|
||||
def show_summary_below(self) -> bool: ...
|
||||
@property
|
||||
def show_summary_right(self) -> bool: ...
|
||||
@property
|
||||
def freeze_panes(self) -> str | None: ...
|
||||
@freeze_panes.setter
|
||||
def freeze_panes(self, topLeftCell: Incomplete | None = ...) -> None: ...
|
||||
|
@ -10,4 +10,3 @@ class ExcelWriter:
|
||||
def save(self) -> None: ...
|
||||
|
||||
def save_workbook(workbook, filename): ...
|
||||
def save_virtual_workbook(workbook): ...
|
||||
|
@ -23,7 +23,7 @@ class LazyReference(str):
|
||||
name: str
|
||||
def resolve_refs(self, rule_map: Mapping[str, Expression | LazyReference]) -> Expression: ...
|
||||
|
||||
class RuleVisitor(NodeVisitor):
|
||||
class RuleVisitor(NodeVisitor[tuple[OrderedDict[str, Expression], Expression | None]]):
|
||||
quantifier_classes: dict[str, type[Expression]]
|
||||
visit_expression: Callable[[RuleVisitor, Node, collections.abc.Sequence[Any]], Any]
|
||||
visit_term: Callable[[RuleVisitor, Node, collections.abc.Sequence[Any]], Any]
|
||||
|
@ -1,7 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Iterator, Sequence
|
||||
from re import Match
|
||||
from typing import Any, NoReturn, TypeVar
|
||||
from typing import Any, Generic, TypeVar
|
||||
|
||||
from parsimonious.exceptions import VisitationError as VisitationError
|
||||
from parsimonious.expressions import Expression
|
||||
@ -27,14 +27,17 @@ class RegexNode(Node):
|
||||
|
||||
class RuleDecoratorMeta(type): ...
|
||||
|
||||
class NodeVisitor(metaclass=RuleDecoratorMeta):
|
||||
_VisitResultT = TypeVar("_VisitResultT")
|
||||
_ChildT = TypeVar("_ChildT")
|
||||
|
||||
class NodeVisitor(Generic[_VisitResultT], metaclass=RuleDecoratorMeta):
|
||||
grammar: Grammar | Incomplete
|
||||
unwrapped_exceptions: tuple[type[BaseException], ...]
|
||||
def visit(self, node: Node) -> Any: ...
|
||||
def generic_visit(self, node: Node, visited_children: Sequence[Any]) -> NoReturn: ...
|
||||
def parse(self, text: str, pos: int = ...) -> Node: ...
|
||||
def match(self, text: str, pos: int = ...) -> Node: ...
|
||||
def lift_child(self, node: Node, children: Sequence[Any]) -> Any: ...
|
||||
def visit(self, node: Node) -> _VisitResultT: ...
|
||||
def generic_visit(self, node: Node, visited_children: Sequence[Any]) -> Incomplete: ...
|
||||
def parse(self, text: str, pos: int = ...) -> _VisitResultT: ...
|
||||
def match(self, text: str, pos: int = ...) -> _VisitResultT: ...
|
||||
def lift_child(self, node: Node, children: Sequence[_ChildT]) -> _ChildT: ...
|
||||
|
||||
_CallableT = TypeVar("_CallableT", bound=Callable[..., Any])
|
||||
|
||||
|
@ -10,7 +10,7 @@ from .coco import COCO
|
||||
_NDArray: TypeAlias = Incomplete
|
||||
_TIOU: TypeAlias = Literal["segm", "bbox", "keypoints"]
|
||||
|
||||
class _EvaluationResult(TypedDict):
|
||||
class _ImageEvaluationResult(TypedDict):
|
||||
image_id: int
|
||||
category_id: int
|
||||
aRng: list[int]
|
||||
@ -27,10 +27,21 @@ class _EvaluationResult(TypedDict):
|
||||
dtIgnore: _NDArray
|
||||
# dtIgnore: npt.NDArray[np.float64]
|
||||
|
||||
class _EvaluationResult(TypedDict):
|
||||
params: Params
|
||||
counts: list[int]
|
||||
date: str
|
||||
# precision: npt.NDArray[np.float64]
|
||||
precision: _NDArray
|
||||
# recall: npt.NDArray[np.float64]
|
||||
recall: _NDArray
|
||||
# scores: npt.NDArray[np.float64]
|
||||
scores: _NDArray
|
||||
|
||||
class COCOeval:
|
||||
cocoGt: COCO
|
||||
cocoDt: COCO
|
||||
evalImgs: list[_EvaluationResult]
|
||||
evalImgs: list[_ImageEvaluationResult]
|
||||
eval: _EvaluationResult
|
||||
params: Params
|
||||
stats: _NDArray
|
||||
@ -41,7 +52,7 @@ class COCOeval:
|
||||
def computeIoU(self, imgId: int, catId: int) -> list[float]: ...
|
||||
def computeOks(self, imgId: int, catId: int) -> _NDArray: ...
|
||||
# def computeOks(self, imgId: int, catId: int) -> npt.NDArray[np.float64]: ...
|
||||
def evaluateImg(self, imgId: int, catId: int, aRng: list[int], maxDet: int) -> _EvaluationResult: ...
|
||||
def evaluateImg(self, imgId: int, catId: int, aRng: list[int], maxDet: int) -> _ImageEvaluationResult: ...
|
||||
def accumulate(self, p: Params | None = ...) -> None: ...
|
||||
def summarize(self) -> None: ...
|
||||
|
||||
@ -53,7 +64,7 @@ class Params:
|
||||
recThrs: _NDArray
|
||||
# recThrs: npt.NDArray[np.float64]
|
||||
maxDets: list[int]
|
||||
areaRng: list[int]
|
||||
areaRng: list[list[float]]
|
||||
areaRngLbl: list[str]
|
||||
useCats: int
|
||||
kpt_oks_sigmas: _NDArray
|
||||
|
@ -1,2 +1,2 @@
|
||||
version = "5.8.*"
|
||||
version = "5.9.*"
|
||||
requires = ["types-setuptools"]
|
||||
|
@ -1,4 +1,5 @@
|
||||
import logging
|
||||
from _typeshed import ReadableBuffer
|
||||
from collections.abc import Callable, Generator
|
||||
from typing import Any
|
||||
|
||||
@ -149,6 +150,8 @@ class Serial(SerialBase):
|
||||
def from_url(self, url: str) -> tuple[str, int]: ...
|
||||
@property
|
||||
def in_waiting(self) -> int: ...
|
||||
def read(self, size: int = 1) -> bytes: ...
|
||||
def write(self, __b: ReadableBuffer) -> int | None: ...
|
||||
def reset_input_buffer(self) -> None: ...
|
||||
def reset_output_buffer(self) -> None: ...
|
||||
@property
|
||||
|
@ -1,3 +1,4 @@
|
||||
from _typeshed import ReadableBuffer
|
||||
from typing import Any
|
||||
|
||||
from serial.serialutil import *
|
||||
@ -10,6 +11,8 @@ class Serial(SerialBase):
|
||||
def open(self) -> None: ...
|
||||
@property
|
||||
def in_waiting(self) -> int: ...
|
||||
def read(self, size: int = 1) -> bytes: ...
|
||||
def write(self, __b: ReadableBuffer) -> int | None: ...
|
||||
def reset_input_buffer(self) -> None: ...
|
||||
def reset_output_buffer(self) -> None: ...
|
||||
@property
|
||||
|
@ -1,3 +1,4 @@
|
||||
from _typeshed import ReadableBuffer
|
||||
from collections.abc import Iterable
|
||||
from typing import Any
|
||||
|
||||
@ -15,6 +16,8 @@ class Serial(SerialBase):
|
||||
def open(self) -> None: ...
|
||||
@property
|
||||
def in_waiting(self) -> int: ...
|
||||
def read(self, size: int = 1) -> bytes: ...
|
||||
def write(self, __b: ReadableBuffer) -> int | None: ...
|
||||
def reset_input_buffer(self) -> None: ...
|
||||
def reset_output_buffer(self) -> None: ...
|
||||
@property
|
||||
|
@ -1,4 +1,5 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer
|
||||
from typing_extensions import Never
|
||||
|
||||
from serial.serialutil import SerialBase
|
||||
@ -64,8 +65,10 @@ class Serial(SerialBase, PlatformSpecific):
|
||||
def open(self) -> None: ...
|
||||
@property
|
||||
def in_waiting(self) -> int: ...
|
||||
def read(self, size: int = 1) -> bytes: ...
|
||||
def cancel_read(self) -> None: ...
|
||||
def cancel_write(self) -> None: ...
|
||||
def write(self, __b: ReadableBuffer) -> int | None: ...
|
||||
def reset_input_buffer(self) -> None: ...
|
||||
def reset_output_buffer(self) -> None: ...
|
||||
def send_break(self, duration: float = ...) -> None: ...
|
||||
|
@ -1,4 +1,6 @@
|
||||
import io
|
||||
from _typeshed import ReadableBuffer, WriteableBuffer
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Callable, Generator
|
||||
from typing import Any
|
||||
from typing_extensions import Final
|
||||
@ -63,7 +65,21 @@ class SerialBase(io.RawIOBase):
|
||||
inter_byte_timeout: float | None = ...,
|
||||
exclusive: float | None = ...,
|
||||
) -> None: ...
|
||||
def read(self, __size: int = ...) -> bytes: ... # same as io.RawIOBase.read but always returns bytes
|
||||
|
||||
# Return type:
|
||||
# ------------
|
||||
# `io.RawIOBase`, the super class, declares the return type of read as `-> bytes | None`.
|
||||
# `SerialBase` does not define `read` at runtime but REQUIRES subclasses to implement it and
|
||||
# require it to return `bytes`.
|
||||
# Abstract:
|
||||
# ---------
|
||||
# `io.RawIOBase` implements `read` in terms of `readinto`. `SerialBase` implements `readinto`
|
||||
# in terms of `read`. If subclasses do not implement `read`, any call to `read` or `read_into`
|
||||
# will fail at runtime with a `RecursionError`.
|
||||
@abstractmethod
|
||||
def read(self, __size: int = -1) -> bytes: ...
|
||||
@abstractmethod
|
||||
def write(self, __b: ReadableBuffer) -> int | None: ...
|
||||
@property
|
||||
def port(self) -> str | None: ...
|
||||
@port.setter
|
||||
@ -130,6 +146,7 @@ class SerialBase(io.RawIOBase):
|
||||
def rs485_mode(self, rs485_settings: RS485Settings | None) -> None: ...
|
||||
def get_settings(self) -> dict[str, Any]: ...
|
||||
def apply_settings(self, d: dict[str, Any]) -> None: ...
|
||||
def readinto(self, __buffer: WriteableBuffer) -> int: ... # returns int unlike `io.RawIOBase`
|
||||
def send_break(self, duration: float = ...) -> None: ...
|
||||
def read_all(self) -> bytes | None: ...
|
||||
def read_until(self, expected: bytes = ..., size: int | None = ...) -> bytes: ...
|
||||
|
@ -1,9 +1,13 @@
|
||||
from _typeshed import ReadableBuffer
|
||||
|
||||
from serial.serialutil import SerialBase
|
||||
|
||||
class Serial(SerialBase):
|
||||
def open(self) -> None: ...
|
||||
@property
|
||||
def in_waiting(self) -> int: ...
|
||||
def read(self, size: int = 1) -> bytes: ...
|
||||
def write(self, __b: ReadableBuffer) -> int | None: ...
|
||||
def reset_input_buffer(self) -> None: ...
|
||||
def reset_output_buffer(self) -> None: ...
|
||||
@property
|
||||
|
@ -1,3 +1,5 @@
|
||||
from _typeshed import ReadableBuffer
|
||||
|
||||
from serial.serialutil import SerialBase
|
||||
|
||||
class Serial(SerialBase):
|
||||
@ -7,3 +9,5 @@ class Serial(SerialBase):
|
||||
def in_waiting(self) -> int: ...
|
||||
def reset_input_buffer(self) -> None: ...
|
||||
def reset_output_buffer(self) -> None: ...
|
||||
def read(self, size: int = 1) -> bytes: ...
|
||||
def write(self, __b: ReadableBuffer) -> int | None: ...
|
||||
|
@ -1,5 +1,6 @@
|
||||
import logging
|
||||
import queue
|
||||
from _typeshed import ReadableBuffer
|
||||
|
||||
from serial.serialutil import SerialBase
|
||||
|
||||
@ -13,8 +14,10 @@ class Serial(SerialBase):
|
||||
def from_url(self, url: str) -> None: ...
|
||||
@property
|
||||
def in_waiting(self) -> int: ...
|
||||
def read(self, size: int = 1) -> bytes: ...
|
||||
def cancel_read(self) -> None: ...
|
||||
def cancel_write(self) -> None: ...
|
||||
def write(self, __b: ReadableBuffer) -> int | None: ...
|
||||
def reset_input_buffer(self) -> None: ...
|
||||
def reset_output_buffer(self) -> None: ...
|
||||
@property
|
||||
|
@ -1,4 +1,5 @@
|
||||
import logging
|
||||
from _typeshed import ReadableBuffer
|
||||
|
||||
from serial.serialutil import SerialBase
|
||||
|
||||
@ -11,6 +12,8 @@ class Serial(SerialBase):
|
||||
def from_url(self, url: str) -> tuple[str, int]: ...
|
||||
@property
|
||||
def in_waiting(self) -> int: ...
|
||||
def read(self, size: int = 1) -> bytes: ...
|
||||
def write(self, __b: ReadableBuffer) -> int | None: ...
|
||||
def reset_input_buffer(self) -> None: ...
|
||||
def reset_output_buffer(self) -> None: ...
|
||||
@property
|
||||
|
@ -135,7 +135,7 @@ def DestroyWindow(_hwnd: int) -> None: ...
|
||||
def EnableWindow(hWnd: int, bEnable): ...
|
||||
def FindWindow(__ClassName: _win32typing.PyResourceId | str | None, __WindowName: str | None) -> int: ...
|
||||
def FindWindowEx(
|
||||
__Parent: int | None, __ChildAfter: int | None, __ClassName: _win32typing.PyResourceId | str, __WindowName: str
|
||||
__Parent: int | None, __ChildAfter: int | None, __ClassName: _win32typing.PyResourceId | str | None, __WindowName: str | None
|
||||
) -> int: ...
|
||||
def DragAcceptFiles(hwnd: int, fAccept) -> None: ...
|
||||
def DragDetect(hwnd: int, point: tuple[Incomplete, Incomplete]) -> None: ...
|
||||
|
@ -15,6 +15,13 @@ class Lock:
|
||||
lua_extend: ClassVar[Incomplete | None]
|
||||
lua_reacquire: ClassVar[Incomplete | None]
|
||||
lua_release: ClassVar[Incomplete | None]
|
||||
redis: Redis[Any]
|
||||
name: str
|
||||
timeout: float | None
|
||||
sleep: float
|
||||
blocking: bool
|
||||
blocking_timeout: float | None
|
||||
thread_local: bool
|
||||
local: _Local
|
||||
def __init__(
|
||||
self,
|
||||
|
@ -1,4 +1,4 @@
|
||||
version = "67.5.*"
|
||||
version = "67.6.*"
|
||||
|
||||
[tool.stubtest]
|
||||
ignore_missing_stub = true
|
||||
|
@ -7,6 +7,7 @@ from typing_extensions import Self
|
||||
from .dist import Distribution
|
||||
|
||||
class Command:
|
||||
distribution: Distribution
|
||||
sub_commands: ClassVar[list[tuple[str, Callable[[Self], bool] | None]]]
|
||||
def __init__(self, dist: Distribution) -> None: ...
|
||||
@abstractmethod
|
||||
|
@ -39,8 +39,8 @@ class build_ext(Command):
|
||||
def build_extension(self, ext) -> None: ...
|
||||
def swig_sources(self, sources, extension): ...
|
||||
def find_swig(self): ...
|
||||
def get_ext_fullpath(self, ext_name): ...
|
||||
def get_ext_fullname(self, ext_name): ...
|
||||
def get_ext_filename(self, ext_name): ...
|
||||
def get_ext_fullpath(self, ext_name: str) -> str: ...
|
||||
def get_ext_fullname(self, ext_name: str) -> str: ...
|
||||
def get_ext_filename(self, ext_name: str) -> str: ...
|
||||
def get_export_symbols(self, ext): ...
|
||||
def get_libraries(self, ext): ...
|
||||
|
@ -1,11 +1,18 @@
|
||||
from _typeshed import FileDescriptorOrPath, Incomplete, SupportsWrite
|
||||
from collections.abc import Iterable, Mapping
|
||||
from typing import IO
|
||||
from re import Pattern
|
||||
from typing import IO, Any, ClassVar, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from .cmd import Command
|
||||
|
||||
command_re: Pattern[str]
|
||||
|
||||
_OptionsList: TypeAlias = list[tuple[str, str | None, str, int] | tuple[str, str | None, str]]
|
||||
_CommandT = TypeVar("_CommandT", bound=Command)
|
||||
|
||||
class DistributionMetadata:
|
||||
def __init__(self, path: FileDescriptorOrPath | None = ...) -> None: ...
|
||||
def __init__(self, path: FileDescriptorOrPath | None = None) -> None: ...
|
||||
name: str | None
|
||||
version: str | None
|
||||
author: str | None
|
||||
@ -54,7 +61,87 @@ class DistributionMetadata:
|
||||
class Distribution:
|
||||
cmdclass: dict[str, type[Command]]
|
||||
metadata: DistributionMetadata
|
||||
def __init__(self, attrs: Mapping[str, Incomplete] | None = ...) -> None: ...
|
||||
def __init__(self, attrs: Mapping[str, Any] | None = None) -> None: ...
|
||||
def get_option_dict(self, command: str) -> dict[str, tuple[str, str]]: ...
|
||||
def parse_config_files(self, filenames: Iterable[str] | None = ...) -> None: ...
|
||||
def get_command_obj(self, command: str, create: bool = ...) -> Command | None: ...
|
||||
def parse_config_files(self, filenames: Iterable[str] | None = None) -> None: ...
|
||||
def get_command_obj(self, command: str, create: bool = True) -> Command | None: ...
|
||||
global_options: ClassVar[_OptionsList]
|
||||
common_usage: ClassVar[str]
|
||||
display_options: ClassVar[_OptionsList]
|
||||
display_option_names: ClassVar[list[str]]
|
||||
negative_opt: ClassVar[dict[str, str]]
|
||||
verbose: int
|
||||
dry_run: int
|
||||
help: int
|
||||
command_packages: list[str] | None
|
||||
script_name: str | None
|
||||
script_args: list[str] | None
|
||||
command_options: dict[str, dict[str, tuple[str, str]]]
|
||||
dist_files: list[tuple[str, str, str]]
|
||||
packages: Incomplete
|
||||
package_data: dict[str, list[str]]
|
||||
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: dict[str, Command]
|
||||
have_run: dict[str, bool]
|
||||
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: str) -> type[Command]: ...
|
||||
@overload
|
||||
def reinitialize_command(self, command: str, reinit_subcommands: bool = False) -> Command: ...
|
||||
@overload
|
||||
def reinitialize_command(self, command: _CommandT, reinit_subcommands: bool = False) -> _CommandT: ...
|
||||
def announce(self, msg, level: int = ...) -> None: ...
|
||||
def run_commands(self) -> None: ...
|
||||
def run_command(self, command: str) -> None: ...
|
||||
def has_pure_modules(self) -> bool: ...
|
||||
def has_ext_modules(self) -> bool: ...
|
||||
def has_c_libraries(self) -> bool: ...
|
||||
def has_modules(self) -> bool: ...
|
||||
def has_headers(self) -> bool: ...
|
||||
def has_scripts(self) -> bool: ...
|
||||
def has_data_files(self) -> bool: ...
|
||||
def is_pure(self) -> bool: ...
|
||||
|
||||
# Getter methods generated in __init__
|
||||
def get_name(self) -> str: ...
|
||||
def get_version(self) -> str: ...
|
||||
def get_fullname(self) -> str: ...
|
||||
def get_author(self) -> str: ...
|
||||
def get_author_email(self) -> str: ...
|
||||
def get_maintainer(self) -> str: ...
|
||||
def get_maintainer_email(self) -> str: ...
|
||||
def get_contact(self) -> str: ...
|
||||
def get_contact_email(self) -> str: ...
|
||||
def get_url(self) -> str: ...
|
||||
def get_license(self) -> str: ...
|
||||
def get_licence(self) -> str: ...
|
||||
def get_description(self) -> str: ...
|
||||
def get_long_description(self) -> str: ...
|
||||
def get_keywords(self) -> str | list[str]: ...
|
||||
def get_platforms(self) -> str | list[str]: ...
|
||||
def get_classifiers(self) -> str | list[str]: ...
|
||||
def get_download_url(self) -> str: ...
|
||||
def get_requires(self) -> list[str]: ...
|
||||
def get_provides(self) -> list[str]: ...
|
||||
def get_obsoletes(self) -> list[str]: ...
|
||||
|
@ -19,18 +19,18 @@ class Extension:
|
||||
self,
|
||||
name: str,
|
||||
sources: list[str],
|
||||
include_dirs: list[str] | None = ...,
|
||||
define_macros: list[tuple[str, str | None]] | None = ...,
|
||||
undef_macros: list[str] | None = ...,
|
||||
library_dirs: list[str] | None = ...,
|
||||
libraries: list[str] | None = ...,
|
||||
runtime_library_dirs: list[str] | None = ...,
|
||||
extra_objects: list[str] | None = ...,
|
||||
extra_compile_args: list[str] | None = ...,
|
||||
extra_link_args: list[str] | None = ...,
|
||||
export_symbols: list[str] | None = ...,
|
||||
swig_opts: list[str] | None = ...,
|
||||
depends: list[str] | None = ...,
|
||||
language: str | None = ...,
|
||||
optional: bool | None = ...,
|
||||
include_dirs: list[str] | None = None,
|
||||
define_macros: list[tuple[str, str | None]] | None = None,
|
||||
undef_macros: list[str] | None = None,
|
||||
library_dirs: list[str] | None = None,
|
||||
libraries: list[str] | None = None,
|
||||
runtime_library_dirs: list[str] | None = None,
|
||||
extra_objects: list[str] | None = None,
|
||||
extra_compile_args: list[str] | None = None,
|
||||
extra_link_args: list[str] | None = None,
|
||||
export_symbols: list[str] | None = None,
|
||||
swig_opts: list[str] | None = None,
|
||||
depends: list[str] | None = None,
|
||||
language: str | None = None,
|
||||
optional: bool | None = None,
|
||||
) -> None: ...
|
||||
|
@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
|
||||
from setuptools import dist
|
||||
@ -14,20 +14,31 @@ class Distribution(dist.Distribution):
|
||||
|
||||
class _BuildMetaBackend:
|
||||
def run_setup(self, setup_script: str = ...) -> None: ...
|
||||
def get_requires_for_build_wheel(self, config_settings: Incomplete | None = ...): ...
|
||||
def get_requires_for_build_sdist(self, config_settings: Incomplete | None = ...): ...
|
||||
def prepare_metadata_for_build_wheel(self, metadata_directory, config_settings: Incomplete | None = ...): ...
|
||||
def get_requires_for_build_wheel(self, config_settings: Mapping[str, Any] | None = ...) -> list[str]: ...
|
||||
def get_requires_for_build_sdist(self, config_settings: Mapping[str, Any] | None = ...) -> list[str]: ...
|
||||
def prepare_metadata_for_build_wheel(
|
||||
self, metadata_directory: str, config_settings: Mapping[str, Any] | None = ...
|
||||
) -> str: ...
|
||||
def build_wheel(
|
||||
self, wheel_directory, config_settings: Incomplete | None = ..., metadata_directory: Incomplete | None = ...
|
||||
): ...
|
||||
def build_sdist(self, sdist_directory, config_settings: Incomplete | None = ...): ...
|
||||
self, wheel_directory: str, config_settings: Mapping[str, Any] | None = ..., metadata_directory: str | None = ...
|
||||
) -> str: ...
|
||||
def build_sdist(self, sdist_directory: str, config_settings: Mapping[str, Any] | None = ...) -> str: ...
|
||||
def build_editable(
|
||||
self, wheel_directory: str, config_settings: Mapping[str, Any] | None = ..., metadata_directory: str | None = ...
|
||||
) -> str: ...
|
||||
def get_requires_for_build_editable(self, config_settings: Mapping[str, Any] | None = ...) -> list[str]: ...
|
||||
def prepare_metadata_for_build_editable(
|
||||
self, metadata_directory: str, config_settings: Mapping[str, Any] | None = ...
|
||||
) -> str: ...
|
||||
|
||||
class _BuildMetaLegacyBackend(_BuildMetaBackend):
|
||||
def run_setup(self, setup_script: str = ...) -> None: ...
|
||||
|
||||
get_requires_for_build_wheel: Any
|
||||
get_requires_for_build_sdist: Any
|
||||
prepare_metadata_for_build_wheel: Any
|
||||
build_wheel: Any
|
||||
build_sdist: Any
|
||||
__legacy__: Any
|
||||
_BACKEND: _BuildMetaBackend = ...
|
||||
get_requires_for_build_wheel = _BACKEND.get_requires_for_build_wheel
|
||||
get_requires_for_build_sdist = _BACKEND.get_requires_for_build_sdist
|
||||
prepare_metadata_for_build_wheel = _BACKEND.prepare_metadata_for_build_wheel
|
||||
build_wheel = _BACKEND.build_wheel
|
||||
build_sdist = _BACKEND.build_sdist
|
||||
|
||||
__legacy__: _BuildMetaLegacyBackend
|
||||
|
@ -1,36 +1,29 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable, Iterator, Mapping, MutableMapping
|
||||
from typing import Any
|
||||
|
||||
from setuptools import SetuptoolsDeprecationWarning
|
||||
from setuptools import Command, SetuptoolsDeprecationWarning
|
||||
|
||||
from ._distutils.dist import Distribution as _Distribution
|
||||
|
||||
class Distribution(_Distribution):
|
||||
def patch_missing_pkg_info(self, attrs) -> None: ...
|
||||
package_data: Incomplete
|
||||
dist_files: Incomplete
|
||||
src_root: Incomplete
|
||||
dependency_links: Incomplete
|
||||
setup_requires: Incomplete
|
||||
def __init__(self, attrs: Incomplete | None = ...) -> None: ...
|
||||
def warn_dash_deprecation(self, opt, section): ...
|
||||
def make_option_lowercase(self, opt, section): ...
|
||||
def parse_config_files(self, filenames: Incomplete | None = ..., ignore_option_errors: bool = ...) -> None: ...
|
||||
def fetch_build_eggs(self, requires): ...
|
||||
def finalize_options(self): ...
|
||||
def get_egg_cache_dir(self): ...
|
||||
def patch_missing_pkg_info(self, attrs: Mapping[str, Any]) -> None: ...
|
||||
src_root: str | None
|
||||
dependency_links: list[str]
|
||||
setup_requires: list[str]
|
||||
def __init__(self, attrs: MutableMapping[str, Any] | None = None) -> None: ...
|
||||
def warn_dash_deprecation(self, opt: str, section: str) -> str: ...
|
||||
def make_option_lowercase(self, opt: str, section: str) -> str: ...
|
||||
def parse_config_files(self, filenames: Iterable[str] | None = ..., ignore_option_errors: bool = ...) -> None: ...
|
||||
def fetch_build_eggs(self, requires: str | Iterable[str]): ...
|
||||
def get_egg_cache_dir(self) -> str: ...
|
||||
def fetch_build_egg(self, req): ...
|
||||
def get_command_class(self, command): ...
|
||||
def print_commands(self): ...
|
||||
def get_command_list(self): ...
|
||||
def get_command_class(self, command: str) -> type[Command]: ...
|
||||
def include(self, **attrs) -> None: ...
|
||||
packages: Incomplete
|
||||
py_modules: Incomplete
|
||||
ext_modules: Incomplete
|
||||
def exclude_package(self, package) -> None: ...
|
||||
def has_contents_for(self, package): ...
|
||||
def exclude_package(self, package: str) -> None: ...
|
||||
def has_contents_for(self, package: str) -> bool | None: ...
|
||||
def exclude(self, **attrs) -> None: ...
|
||||
def get_cmdline_options(self): ...
|
||||
def iter_distribution_names(self) -> None: ...
|
||||
def get_cmdline_options(self) -> dict[str, dict[str, str | None]]: ...
|
||||
def iter_distribution_names(self) -> Iterator[str]: ...
|
||||
def handle_display_options(self, option_order): ...
|
||||
|
||||
class DistDeprecationWarning(SetuptoolsDeprecationWarning): ...
|
||||
|
@ -5,7 +5,27 @@ from ._distutils.extension import Extension as _Extension
|
||||
have_pyrex: Any
|
||||
|
||||
class Extension(_Extension):
|
||||
py_limited_api: Any
|
||||
def __init__(self, name, sources, *args, **kw) -> None: ...
|
||||
py_limited_api: bool
|
||||
def __init__(
|
||||
self,
|
||||
name: str,
|
||||
sources: list[str],
|
||||
include_dirs: list[str] | None = None,
|
||||
define_macros: list[tuple[str, str | None]] | None = None,
|
||||
undef_macros: list[str] | None = None,
|
||||
library_dirs: list[str] | None = None,
|
||||
libraries: list[str] | None = None,
|
||||
runtime_library_dirs: list[str] | None = None,
|
||||
extra_objects: list[str] | None = None,
|
||||
extra_compile_args: list[str] | None = None,
|
||||
extra_link_args: list[str] | None = None,
|
||||
export_symbols: list[str] | None = None,
|
||||
swig_opts: list[str] | None = None,
|
||||
depends: list[str] | None = None,
|
||||
language: str | None = None,
|
||||
optional: bool | None = None,
|
||||
*,
|
||||
py_limited_api: bool = False,
|
||||
) -> None: ...
|
||||
|
||||
class Library(Extension): ...
|
||||
|
@ -50,7 +50,7 @@ def create_unbound_method(func: types.FunctionType, cls: type) -> types.Function
|
||||
Iterator = object
|
||||
|
||||
def get_method_function(meth: types.MethodType) -> types.FunctionType: ...
|
||||
def get_method_self(meth: types.MethodType) -> object | None: ...
|
||||
def get_method_self(meth: types.MethodType) -> object: ...
|
||||
def get_function_closure(fun: types.FunctionType) -> tuple[types._Cell, ...] | None: ...
|
||||
def get_function_code(fun: types.FunctionType) -> types.CodeType: ...
|
||||
def get_function_defaults(fun: types.FunctionType) -> tuple[Any, ...] | None: ...
|
||||
|
@ -388,3 +388,4 @@ class withitem(AST):
|
||||
|
||||
class TypeIgnore(AST):
|
||||
lineno: int
|
||||
tag: str
|
||||
|
@ -1,2 +1,2 @@
|
||||
version = "4.2"
|
||||
version = "4.3"
|
||||
requires = ["types-pytz"]
|
||||
|
Loading…
Reference in New Issue
Block a user