Use lowercase type everywhere (#6853)

This commit is contained in:
Alex Waygood
2022-01-08 15:09:29 +00:00
committed by GitHub
parent f8501d33c7
commit a40d79a4e6
172 changed files with 728 additions and 761 deletions

View File

@@ -1,4 +1,4 @@
from typing import Any, Callable, Type, TypeVar, overload
from typing import Any, Callable, TypeVar, overload
from typing_extensions import Literal
_F = TypeVar("_F", bound=Callable[..., Any])
@@ -8,9 +8,9 @@ class ClassicAdapter:
reason: str
version: str
action: _Actions | None
category: Type[Warning]
category: type[Warning]
def __init__(
self, reason: str = ..., version: str = ..., action: _Actions | None = ..., category: Type[Warning] = ...
self, reason: str = ..., version: str = ..., action: _Actions | None = ..., category: type[Warning] = ...
) -> None: ...
def get_deprecated_msg(self, wrapped: Callable[..., Any], instance: object) -> str: ...
def __call__(self, wrapped: _F) -> Callable[[_F], _F]: ...
@@ -19,5 +19,5 @@ class ClassicAdapter:
def deprecated(__wrapped: _F) -> _F: ...
@overload
def deprecated(
reason: str = ..., *, version: str = ..., action: _Actions | None = ..., category: Type[Warning] | None = ...
reason: str = ..., *, version: str = ..., action: _Actions | None = ..., category: type[Warning] | None = ...
) -> Callable[[_F], _F]: ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Callable, Type, TypeVar
from typing import Any, Callable, TypeVar
from typing_extensions import Literal
from .classic import ClassicAdapter, _Actions
@@ -10,14 +10,14 @@ class SphinxAdapter(ClassicAdapter):
reason: str
version: str
action: _Actions | None
category: Type[Warning]
category: type[Warning]
def __init__(
self,
directive: Literal["versionadded", "versionchanged", "deprecated"],
reason: str = ...,
version: str = ...,
action: _Actions | None = ...,
category: Type[Warning] = ...,
category: type[Warning] = ...,
) -> None: ...
def __call__(self, wrapped: _F) -> Callable[[_F], _F]: ...
@@ -29,5 +29,5 @@ def deprecated(
line_length: int = ...,
*,
action: _Actions | None = ...,
category: Type[Warning] | None = ...,
category: type[Warning] | None = ...,
) -> Callable[[_F], _F]: ...

View File

@@ -1,5 +1,5 @@
from _typeshed import Self
from typing import Any, Callable, Iterable, Sequence, Type
from typing import Any, Callable, Iterable, Sequence
from typing_extensions import Literal
from .Image import Image
@@ -121,7 +121,7 @@ class Color3DLUT(MultibandFilter):
) -> None: ...
@classmethod
def generate(
cls: Type[Self],
cls: type[Self],
size: int | tuple[int, int, int],
callback: Callable[[float, float, float], Iterable[float]],
channels: int = ...,

View File

@@ -1,5 +1,5 @@
from socket import socket as _socket
from typing import Any, AnyStr, Generic, Mapping, Type, TypeVar, overload
from typing import Any, AnyStr, Generic, Mapping, TypeVar, overload
from .charset import charset_by_id as charset_by_id, charset_by_name as charset_by_name
from .constants import CLIENT as CLIENT, COMMAND as COMMAND, FIELD_TYPE as FIELD_TYPE, SERVER_STATUS as SERVER_STATUS
@@ -133,7 +133,7 @@ class Connection(Generic[_C]):
conv=...,
use_unicode: bool | None = ...,
client_flag: int = ...,
cursorclass: Type[_C] = ..., # different between overloads
cursorclass: type[_C] = ..., # different between overloads
init_command: Any | None = ...,
connect_timeout: int | None = ...,
ssl: Mapping[Any, Any] | None = ...,
@@ -178,7 +178,7 @@ class Connection(Generic[_C]):
@overload
def cursor(self, cursor: None = ...) -> _C: ...
@overload
def cursor(self, cursor: Type[_C2]) -> _C2: ...
def cursor(self, cursor: type[_C2]) -> _C2: ...
def query(self, sql, unbuffered: bool = ...) -> int: ...
def next_result(self, unbuffered: bool = ...) -> int: ...
def affected_rows(self): ...

View File

@@ -2,9 +2,9 @@ import datetime
import time
from collections.abc import Callable, Mapping, Sequence
from decimal import Decimal
from typing import Any, Optional, Type, TypeVar
from typing import Any, Optional, TypeVar
_EscaperMapping = Optional[Mapping[Type[object], Callable[..., str]]]
_EscaperMapping = Optional[Mapping[type[object], Callable[..., str]]]
_T = TypeVar("_T")
def escape_item(val: object, charset: object, mapping: _EscaperMapping = ...) -> str: ...
@@ -33,7 +33,7 @@ def through(x: _T) -> _T: ...
convert_bit = through
encoders: dict[Type[object], Callable[..., str]]
encoders: dict[type[object], Callable[..., str]]
decoders: dict[int, Callable[[str | bytes], Any]]
conversions: dict[Type[object] | int, Callable[..., Any]]
conversions: dict[type[object] | int, Callable[..., Any]]
Thing2Literal = escape_str

View File

@@ -1,5 +1,5 @@
import builtins
from typing import NoReturn, Type
from typing import NoReturn
from .constants import ER as ER
@@ -15,6 +15,6 @@ class InternalError(DatabaseError): ...
class ProgrammingError(DatabaseError): ...
class NotSupportedError(DatabaseError): ...
error_map: dict[int, Type[DatabaseError]]
error_map: dict[int, type[DatabaseError]]
def raise_mysql_exception(data) -> NoReturn: ...

View File

@@ -1,5 +1,5 @@
from collections.abc import Callable, Iterable, Iterator, Mapping, Sequence
from typing import IO, Any, Pattern, Type, TypeVar, overload
from typing import IO, Any, Pattern, TypeVar, overload
from . import resolver as resolver # Help mypy a bit; this is implied by loader and dumper
from .constructor import BaseConstructor
@@ -270,39 +270,39 @@ def add_implicit_resolver(
tag: str,
regexp: Pattern[str],
first: Iterable[Any] | None = ...,
Loader: Type[BaseResolver] | None = ...,
Dumper: Type[BaseResolver] = ...,
Loader: type[BaseResolver] | None = ...,
Dumper: type[BaseResolver] = ...,
) -> None: ...
def add_path_resolver(
tag: str,
path: Iterable[Any],
kind: Type[Any] | None = ...,
Loader: Type[BaseResolver] | None = ...,
Dumper: Type[BaseResolver] = ...,
kind: type[Any] | None = ...,
Loader: type[BaseResolver] | None = ...,
Dumper: type[BaseResolver] = ...,
) -> None: ...
@overload
def add_constructor(
tag: str, constructor: Callable[[Loader | FullLoader | UnsafeLoader, Node], Any], Loader: None = ...
) -> None: ...
@overload
def add_constructor(tag: str, constructor: Callable[[_Constructor, Node], Any], Loader: Type[_Constructor]) -> None: ...
def add_constructor(tag: str, constructor: Callable[[_Constructor, Node], Any], Loader: type[_Constructor]) -> None: ...
@overload
def add_multi_constructor(
tag_prefix: str, multi_constructor: Callable[[Loader | FullLoader | UnsafeLoader, str, Node], Any], Loader: None = ...
) -> None: ...
@overload
def add_multi_constructor(
tag_prefix: str, multi_constructor: Callable[[_Constructor, str, Node], Any], Loader: Type[_Constructor]
tag_prefix: str, multi_constructor: Callable[[_Constructor, str, Node], Any], Loader: type[_Constructor]
) -> None: ...
@overload
def add_representer(data_type: Type[_T], representer: Callable[[Dumper, _T], Node]) -> None: ...
def add_representer(data_type: type[_T], representer: Callable[[Dumper, _T], Node]) -> None: ...
@overload
def add_representer(data_type: Type[_T], representer: Callable[[_Representer, _T], Node], Dumper: Type[_Representer]) -> None: ...
def add_representer(data_type: type[_T], representer: Callable[[_Representer, _T], Node], Dumper: type[_Representer]) -> None: ...
@overload
def add_multi_representer(data_type: Type[_T], multi_representer: Callable[[Dumper, _T], Node]) -> None: ...
def add_multi_representer(data_type: type[_T], multi_representer: Callable[[Dumper, _T], Node]) -> None: ...
@overload
def add_multi_representer(
data_type: Type[_T], multi_representer: Callable[[_Representer, _T], Node], Dumper: Type[_Representer]
data_type: type[_T], multi_representer: Callable[[_Representer, _T], Node], Dumper: type[_Representer]
) -> None: ...
class YAMLObjectMetaclass(type):

View File

@@ -2,7 +2,7 @@ import datetime
from _typeshed import SupportsItems
from collections.abc import Callable, Iterable, Mapping
from types import BuiltinFunctionType, FunctionType, ModuleType
from typing import Any, ClassVar, NoReturn, Type, TypeVar
from typing import Any, ClassVar, NoReturn, TypeVar
from yaml.error import YAMLError as YAMLError
from yaml.nodes import MappingNode as MappingNode, Node as Node, ScalarNode as ScalarNode, SequenceNode as SequenceNode
@@ -13,8 +13,8 @@ _R = TypeVar("_R", bound=BaseRepresenter)
class RepresenterError(YAMLError): ...
class BaseRepresenter:
yaml_representers: ClassVar[dict[Type[Any], Callable[[BaseRepresenter, Any], Node]]]
yaml_multi_representers: ClassVar[dict[Type[Any], Callable[[BaseRepresenter, Any], Node]]]
yaml_representers: ClassVar[dict[type[Any], Callable[[BaseRepresenter, Any], Node]]]
yaml_multi_representers: ClassVar[dict[type[Any], Callable[[BaseRepresenter, Any], Node]]]
default_style: str | Any
sort_keys: bool
default_flow_style: bool
@@ -25,9 +25,9 @@ class BaseRepresenter:
def represent(self, data) -> None: ...
def represent_data(self, data) -> Node: ...
@classmethod
def add_representer(cls: Type[_R], data_type: Type[_T], representer: Callable[[_R, _T], Node]) -> None: ...
def add_representer(cls: type[_R], data_type: type[_T], representer: Callable[[_R, _T], Node]) -> None: ...
@classmethod
def add_multi_representer(cls: Type[_R], data_type: Type[_T], representer: Callable[[_R, _T], Node]) -> None: ...
def add_multi_representer(cls: type[_R], data_type: type[_T], representer: Callable[[_R, _T], Node]) -> None: ...
def represent_scalar(self, tag: str, value, style: str | None = ...) -> ScalarNode: ...
def represent_sequence(self, tag: str, sequence: Iterable[Any], flow_style: bool | None = ...) -> SequenceNode: ...
def represent_mapping(

View File

@@ -1,4 +1,4 @@
from typing import Generator, Type
from typing import Generator
from ..formatter import Formatter
from .bbcode import BBCodeFormatter as BBCodeFormatter
@@ -18,7 +18,7 @@ from .svg import SvgFormatter as SvgFormatter
from .terminal import TerminalFormatter as TerminalFormatter
from .terminal256 import Terminal256Formatter as Terminal256Formatter, TerminalTrueColorFormatter as TerminalTrueColorFormatter
def get_all_formatters() -> Generator[Type[Formatter], None, None]: ...
def get_all_formatters() -> Generator[type[Formatter], None, None]: ...
def get_formatter_by_name(_alias, **options): ...
def load_formatter_from_file(filename, formattername: str = ..., **options): ...
def get_formatter_for_filename(fn, **options): ...

View File

@@ -1,4 +1,4 @@
from typing import Any, ClassVar, Type
from typing import Any, ClassVar
from .. import types as sqltypes
from ..util import memoized_property
@@ -13,7 +13,7 @@ NO_CACHE_KEY: Any
NO_DIALECT_SUPPORT: Any
class DefaultDialect(interfaces.Dialect):
execution_ctx_cls: ClassVar[Type[interfaces.ExecutionContext]]
execution_ctx_cls: ClassVar[type[interfaces.ExecutionContext]]
statement_compiler: Any
ddl_compiler: Any
type_compiler: Any

View File

@@ -1,5 +1,5 @@
from collections.abc import Callable
from typing import Any, Type as TypingType
from typing import Any
MypyFile = Any # from mypy.nodes
AttributeContext = Any # from mypy.plugin
@@ -17,4 +17,4 @@ class SQLAlchemyPlugin(Plugin):
def get_attribute_hook(self, fullname: str) -> Callable[[AttributeContext], Type] | None: ...
def get_additional_deps(self, file: MypyFile) -> list[tuple[int, str, int]]: ...
def plugin(version: str) -> TypingType[SQLAlchemyPlugin]: ...
def plugin(version: str) -> type[SQLAlchemyPlugin]: ...

View File

@@ -1,5 +1,5 @@
from collections.abc import Iterable, Iterator
from typing import Any, Type as TypingType, TypeVar, overload
from typing import Any, TypeVar, overload
CallExpr = Any # from mypy.nodes
Context = Any # from mypy.nodes
@@ -42,7 +42,7 @@ def add_global(ctx: ClassDefContext | DynamicClassDefContext, module: str, symbo
@overload
def get_callexpr_kwarg(callexpr: CallExpr, name: str, *, expr_types: None = ...) -> CallExpr | NameExpr | None: ...
@overload
def get_callexpr_kwarg(callexpr: CallExpr, name: str, *, expr_types: tuple[TypingType[_TArgType], ...]) -> _TArgType | None: ...
def get_callexpr_kwarg(callexpr: CallExpr, name: str, *, expr_types: tuple[type[_TArgType], ...]) -> _TArgType | None: ...
def flatten_typechecking(stmts: Iterable[Statement]) -> Iterator[Statement]: ...
def unbound_to_instance(api: SemanticAnalyzerPluginInterface, typ: Type) -> Type: ...
def info_for_cls(cls, api: SemanticAnalyzerPluginInterface) -> TypeInfo | None: ...

View File

@@ -1,6 +1,6 @@
from _typeshed import Self
from types import CodeType, FrameType, TracebackType, coroutine
from typing import Any, Coroutine, Generator, Generic, Iterator, Type, TypeVar
from typing import Any, Coroutine, Generator, Generic, Iterator, TypeVar
_T = TypeVar("_T")
_T_co = TypeVar("_T_co", covariant=True)
@@ -15,7 +15,7 @@ class AsyncBase(Generic[_T]):
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: ...
def throw(self, typ: Type[BaseException], val: BaseException | object = ..., tb: TracebackType | None = ...) -> _T_co: ...
def throw(self, typ: type[BaseException], val: BaseException | object = ..., tb: TracebackType | None = ...) -> _T_co: ...
def close(self) -> None: ...
@property
def gi_frame(self) -> FrameType: ...
@@ -30,5 +30,5 @@ class AiofilesContextManager(Generic[_T_co, _T_contra, _V_co]):
async def __anext__(self) -> _V_co: ...
async def __aenter__(self) -> _V_co: ...
async def __aexit__(
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
) -> None: ...

View File

@@ -1,5 +1,5 @@
from _typeshed import StrOrBytesPath
from typing import IO, Any, AnyStr, Callable, ContextManager, Text, Type
from typing import IO, Any, AnyStr, Callable, ContextManager, Text
def replace_atomic(src: AnyStr, dst: AnyStr) -> None: ...
def move_atomic(src: AnyStr, dst: AnyStr) -> None: ...
@@ -13,4 +13,4 @@ class AtomicWriter(object):
def commit(self, f: IO[Any]) -> None: ...
def rollback(self, f: IO[Any]) -> None: ...
def atomic_write(path: StrOrBytesPath, writer_cls: Type[AtomicWriter] = ..., **cls_kwargs: object) -> ContextManager[IO[Any]]: ...
def atomic_write(path: StrOrBytesPath, writer_cls: type[AtomicWriter] = ..., **cls_kwargs: object) -> ContextManager[IO[Any]]: ...

View File

@@ -1,5 +1,5 @@
from _typeshed import Self, SupportsRead
from typing import Any, Sequence, Type
from typing import Any, Sequence
from .builder import TreeBuilder
from .element import PageElement, SoupStrainer, Tag
@@ -23,11 +23,11 @@ class BeautifulSoup(Tag):
self,
markup: str | bytes | SupportsRead[str] | SupportsRead[bytes] = ...,
features: str | Sequence[str] | None = ...,
builder: TreeBuilder | Type[TreeBuilder] | None = ...,
builder: TreeBuilder | type[TreeBuilder] | None = ...,
parse_only: SoupStrainer | None = ...,
from_encoding: str | None = ...,
exclude_encodings: Sequence[str] | None = ...,
element_classes: dict[Type[PageElement], Type[Any]] | None = ...,
element_classes: dict[type[PageElement], type[Any]] | None = ...,
**kwargs,
) -> None: ...
def __copy__(self: Self) -> Self: ...

View File

@@ -1,6 +1,6 @@
from _typeshed import Self
from collections.abc import Iterator
from typing import Any, Callable, Generic, Iterable, Mapping, Pattern, Type, TypeVar, Union, overload
from typing import Any, Callable, Generic, Iterable, Mapping, Pattern, TypeVar, Union, overload
from . import BeautifulSoup
from .builder import TreeBuilder
@@ -13,7 +13,7 @@ whitespace_re: Pattern[str]
PYTHON_SPECIFIC_ENCODINGS: set[str]
class NamespacedAttribute(str):
def __new__(cls: Type[Self], prefix: str, name: str | None = ..., namespace: str | None = ...) -> Self: ...
def __new__(cls: type[Self], prefix: str, name: str | None = ..., namespace: str | None = ...) -> Self: ...
class AttributeValueWithCharsetSubstitution(str): ...
@@ -53,7 +53,7 @@ class PageElement:
previousSibling: PageElement | None
@property
def stripped_strings(self) -> Iterator[str]: ...
def get_text(self, separator: str = ..., strip: bool = ..., types: tuple[Type[NavigableString], ...] = ...) -> str: ...
def get_text(self, separator: str = ..., strip: bool = ..., types: tuple[type[NavigableString], ...] = ...) -> str: ...
getText = get_text
@property
def text(self) -> str: ...
@@ -182,7 +182,7 @@ class NavigableString(str, PageElement):
PREFIX: str
SUFFIX: str
known_xml: bool | None
def __new__(cls: Type[Self], value: str | bytes) -> Self: ...
def __new__(cls: type[Self], value: str | bytes) -> Self: ...
def __copy__(self: Self) -> Self: ...
def __getnewargs__(self) -> tuple[str]: ...
def output_ready(self, formatter: Formatter | str | None = ...) -> str: ...
@@ -227,7 +227,7 @@ class Script(NavigableString): ...
class TemplateString(NavigableString): ...
class Tag(PageElement):
parser_class: Type[BeautifulSoup] | None
parser_class: type[BeautifulSoup] | None
name: str
namespace: str | None
prefix: str | None
@@ -256,9 +256,9 @@ class Tag(PageElement):
can_be_empty_element: bool | None = ...,
cdata_list_attributes: list[str] | None = ...,
preserve_whitespace_tags: list[str] | None = ...,
interesting_string_types: Type[NavigableString] | tuple[Type[NavigableString], ...] | None = ...,
interesting_string_types: type[NavigableString] | tuple[type[NavigableString], ...] | None = ...,
) -> None: ...
parserClass: Type[BeautifulSoup] | None
parserClass: type[BeautifulSoup] | None
def __copy__(self: Self) -> Self: ...
@property
def is_empty_element(self) -> bool: ...
@@ -267,7 +267,7 @@ class Tag(PageElement):
def string(self) -> str | None: ...
@string.setter
def string(self, string: str) -> None: ...
DEFAULT_INTERESTING_STRING_TYPES: tuple[Type[NavigableString], ...]
DEFAULT_INTERESTING_STRING_TYPES: tuple[type[NavigableString], ...]
@property
def strings(self) -> Iterable[str]: ...
def decompose(self) -> None: ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Mapping, Type
from typing import Any, Mapping
from boto.connection import AWSQueryConnection
@@ -8,7 +8,7 @@ class KMSConnection(AWSQueryConnection):
DefaultRegionEndpoint: str
ServiceName: str
TargetPrefix: str
ResponseError: Type[Exception]
ResponseError: type[Exception]
region: Any
def __init__(self, **kwargs) -> None: ...
def create_alias(self, alias_name: str, target_key_id: str) -> dict[str, Any] | None: ...

View File

@@ -1,4 +1,4 @@
from typing import Text, Type
from typing import Text
from boto.connection import AWSAuthConnection
from boto.regioninfo import RegionInfo
@@ -10,7 +10,7 @@ class S3RegionInfo(RegionInfo):
self,
name: Text | None = ...,
endpoint: str | None = ...,
connection_cls: Type[AWSAuthConnection] | None = ...,
connection_cls: type[AWSAuthConnection] | None = ...,
**kw_params,
) -> S3Connection: ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Text, Type
from typing import Any, Text
from .bucketlistresultset import BucketListResultSet
from .connection import S3Connection
@@ -19,8 +19,8 @@ class Bucket:
MFADeleteRE: str
name: Text
connection: S3Connection
key_class: Type[Key]
def __init__(self, connection: S3Connection | None = ..., name: Text | None = ..., key_class: Type[Key] = ...) -> None: ...
key_class: type[Key]
def __init__(self, connection: S3Connection | None = ..., name: Text | None = ..., key_class: type[Key] = ...) -> None: ...
def __iter__(self): ...
def __contains__(self, key_name) -> bool: ...
def startElement(self, name, attrs, connection): ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Text, Type
from typing import Any, Text
from boto.connection import AWSAuthConnection
from boto.exception import BotoClientError
@@ -48,7 +48,7 @@ class S3Connection(AWSAuthConnection):
DefaultCallingFormat: Any
QueryString: str
calling_format: Any
bucket_class: Type[Bucket]
bucket_class: type[Bucket]
anon: Any
def __init__(
self,
@@ -66,7 +66,7 @@ class S3Connection(AWSAuthConnection):
calling_format: Any = ...,
path: str = ...,
provider: str = ...,
bucket_class: Type[Bucket] = ...,
bucket_class: type[Bucket] = ...,
security_token: Any | None = ...,
suppress_consec_slashes: bool = ...,
anon: bool = ...,
@@ -75,7 +75,7 @@ class S3Connection(AWSAuthConnection):
) -> None: ...
def __iter__(self): ...
def __contains__(self, bucket_name): ...
def set_bucket_class(self, bucket_class: Type[Bucket]) -> None: ...
def set_bucket_class(self, bucket_class: type[Bucket]) -> None: ...
def build_post_policy(self, expiration_time, conditions): ...
def build_post_form_args(
self,

View File

@@ -3,7 +3,7 @@ import logging.handlers
import subprocess
import sys
import time
from typing import IO, Any, Callable, ContextManager, Iterable, Mapping, Sequence, Type, TypeVar
from typing import IO, Any, Callable, ContextManager, Iterable, Mapping, Sequence, TypeVar
import boto.connection
@@ -37,7 +37,7 @@ else:
_Provider = Any # TODO replace this with boto.provider.Provider once stubs exist
_LockType = Any # TODO replace this with _thread.LockType once stubs exist
JSONDecodeError: Type[ValueError]
JSONDecodeError: type[ValueError]
qsa_of_interest: list[str]
def unquote_v(nv: str) -> str | tuple[str, str]: ...
@@ -71,7 +71,7 @@ LOCALE_LOCK: _LockType
def setlocale(name: str | tuple[str, str]) -> ContextManager[str]: ...
def get_ts(ts: time.struct_time | None = ...) -> str: ...
def parse_ts(ts: str) -> datetime.datetime: ...
def find_class(module_name: str, class_name: str | None = ...) -> Type[Any] | None: ...
def find_class(module_name: str, class_name: str | None = ...) -> type[Any] | None: ...
def update_dme(username: str, password: str, dme_id: str, ip_address: str) -> str: ...
def fetch_file(
uri: str, file: IO[str] | None = ..., username: str | None = ..., password: str | None = ...

View File

@@ -1,5 +1,3 @@
from typing import Type
def assert_(condition: object) -> None: ...
ERR_FRAGMENT: str
@@ -22,4 +20,4 @@ class NotFoundError(DAVError): ...
class ConsistencyError(DAVError): ...
class ResponseError(DAVError): ...
exception_by_method: dict[str, Type[DAVError]]
exception_by_method: dict[str, type[DAVError]]

View File

@@ -1,7 +1,7 @@
import datetime
from _typeshed import Self
from collections.abc import Iterable, Iterator, Mapping
from typing import Any, Type, TypeVar, overload
from typing import Any, TypeVar, overload
from typing_extensions import Literal
from urllib.parse import ParseResult, SplitResult
@@ -101,7 +101,7 @@ class Calendar(DAVObject):
@overload
def search(self, xml, comp_class: None = ...) -> list[CalendarObjectResource]: ...
@overload
def search(self, xml, comp_class: Type[_CC]) -> list[_CC]: ...
def search(self, xml, comp_class: type[_CC]) -> list[_CC]: ...
def freebusy_request(self, start: datetime.datetime, end: datetime.datetime) -> FreeBusy: ...
def todos(self, sort_keys: Iterable[str] = ..., include_completed: bool = ..., sort_key: str | None = ...) -> list[Todo]: ...
def event_by_url(self, href, data: Any | None = ...) -> Event: ...

View File

@@ -1,4 +1,4 @@
from typing import Any, AnyStr, Callable, Sequence, Type, TypeVar
from typing import Any, AnyStr, Callable, Sequence, TypeVar
def with_repr(attrs: Sequence[AnyStr | Attribute]) -> Callable[..., Any]: ...
def with_cmp(attrs: Sequence[AnyStr | Attribute]) -> Callable[..., Any]: ...
@@ -18,7 +18,7 @@ def attributes(
apply_immutable: bool = ...,
store_attributes: Callable[[type, Attribute], Any] | None = ...,
**kw: dict[Any, Any] | None,
) -> Callable[[Type[_T]], Type[_T]]: ...
) -> Callable[[type[_T]], type[_T]]: ...
class Attribute:
def __init__(

View File

@@ -1,6 +1,6 @@
import threading
from types import TracebackType
from typing import Iterator, Protocol, Type
from typing import Iterator, Protocol
from typing_extensions import Literal
__version__: str
@@ -24,7 +24,7 @@ class Spinner(object):
def init_spin(self) -> None: ...
def __enter__(self) -> Spinner: ...
def __exit__(
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
) -> Literal[False]: ...
def spinner(beep: bool, disable: bool, force: bool, stream: _Stream) -> Spinner: ...

View File

@@ -1,8 +1,8 @@
import datetime
from typing import Any, Iterator, Text, Type, TypeVar, Union
from typing import Any, Iterator, Text, TypeVar, Union
from typing_extensions import Literal
_RetType = Union[Type[float], Type[datetime.datetime]]
_RetType = Union[type[float], type[datetime.datetime]]
_SelfT = TypeVar("_SelfT", bound=croniter)
class CroniterError(ValueError): ...
@@ -74,5 +74,5 @@ def croniter_range(
ret_type: _RetType | None = ...,
day_or: bool = ...,
exclude_ends: bool = ...,
_croniter: Type[croniter] | None = ...,
_croniter: type[croniter] | None = ...,
) -> Iterator[Any]: ...

View File

@@ -2,7 +2,7 @@ import datetime
from abc import ABCMeta, abstractmethod
from enum import Enum
from ipaddress import IPv4Address, IPv4Network, IPv6Address, IPv6Network
from typing import Any, ClassVar, Generator, Generic, Iterable, Sequence, Text, Type, TypeVar
from typing import Any, ClassVar, Generator, Generic, Iterable, Sequence, Text, TypeVar
from cryptography.hazmat.backends.interfaces import X509Backend
from cryptography.hazmat.primitives.asymmetric.dsa import DSAPrivateKey, DSAPublicKey
@@ -293,7 +293,7 @@ class Extensions(object):
def __init__(self, general_names: list[Extension[Any]]) -> None: ...
def __iter__(self) -> Generator[Extension[Any], None, None]: ...
def get_extension_for_oid(self, oid: ObjectIdentifier) -> Extension[Any]: ...
def get_extension_for_class(self, extclass: Type[_T]) -> Extension[_T]: ...
def get_extension_for_class(self, extclass: type[_T]) -> Extension[_T]: ...
class DuplicateExtension(Exception):
oid: ObjectIdentifier
@@ -306,12 +306,12 @@ class ExtensionNotFound(Exception):
class IssuerAlternativeName(ExtensionType):
def __init__(self, general_names: list[GeneralName]) -> None: ...
def __iter__(self) -> Generator[GeneralName, None, None]: ...
def get_values_for_type(self, type: Type[GeneralName]) -> list[Any]: ...
def get_values_for_type(self, type: type[GeneralName]) -> list[Any]: ...
class SubjectAlternativeName(ExtensionType):
def __init__(self, general_names: list[GeneralName]) -> None: ...
def __iter__(self) -> Generator[GeneralName, None, None]: ...
def get_values_for_type(self, type: Type[GeneralName]) -> list[Any]: ...
def get_values_for_type(self, type: type[GeneralName]) -> list[Any]: ...
class AuthorityKeyIdentifier(ExtensionType):
@property

View File

@@ -1,5 +1,5 @@
import sys
from typing import Any, Callable, Generic, Iterable, Mapping, Type, TypeVar, overload
from typing import Any, Callable, Generic, Iterable, Mapping, TypeVar, overload
if sys.version_info >= (3, 9):
from types import GenericAlias
@@ -19,17 +19,17 @@ def astuple(obj: Any) -> tuple[Any, ...]: ...
@overload
def astuple(obj: Any, *, tuple_factory: Callable[[list[Any]], _T]) -> _T: ...
@overload
def dataclass(_cls: Type[_T]) -> Type[_T]: ...
def dataclass(_cls: type[_T]) -> type[_T]: ...
@overload
def dataclass(_cls: None) -> Callable[[Type[_T]], Type[_T]]: ...
def dataclass(_cls: None) -> Callable[[type[_T]], type[_T]]: ...
@overload
def dataclass(
*, init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., unsafe_hash: bool = ..., frozen: bool = ...
) -> Callable[[Type[_T]], Type[_T]]: ...
) -> Callable[[type[_T]], type[_T]]: ...
class Field(Generic[_T]):
name: str
type: Type[_T]
type: type[_T]
default: _T
default_factory: Callable[[], _T]
repr: bool

View File

@@ -2,7 +2,7 @@ import collections
import sys
from _typeshed import Self as Self
from datetime import datetime
from typing import ClassVar, Iterable, Iterator, Type, overload
from typing import ClassVar, Iterable, Iterator, overload
from dateparser import _Settings
from dateparser.conf import Settings
@@ -107,4 +107,4 @@ class DateDataParser:
def _get_applicable_locales(self, date_string: str) -> Iterator[Locale]: ...
def _is_applicable_locale(self, locale: Locale, date_string: str) -> bool: ...
@classmethod
def _get_locale_loader(cls: Type[DateDataParser]) -> LocaleDataLoader: ...
def _get_locale_loader(cls: type[DateDataParser]) -> LocaleDataLoader: ...

View File

@@ -1,7 +1,7 @@
import optparse
from collections.abc import Iterable, Mapping
from configparser import RawConfigParser
from typing import Any, ClassVar, Type
from typing import Any, ClassVar
from docutils import SettingsSpec
from docutils.parsers import Parser
@@ -64,7 +64,7 @@ class OptionParser(optparse.OptionParser, SettingsSpec):
version_template: ClassVar[str]
def __init__(
self,
components: Iterable[Type[Parser]] = ...,
components: Iterable[type[Parser]] = ...,
defaults: Mapping[str, Any] | None = ...,
read_config_files: bool | None = ...,
*args,

View File

@@ -1,4 +1,4 @@
from typing import Any, ClassVar, Type
from typing import Any, ClassVar
from docutils import Component
@@ -13,4 +13,4 @@ class Parser(Component):
_parser_aliases: dict[str, str]
def get_parser_class(parser_name: str) -> Type[Parser]: ...
def get_parser_class(parser_name: str) -> type[Parser]: ...

View File

@@ -1,6 +1,6 @@
import sys
from _typeshed import Self
from typing import Any, Iterator, Sequence, Text, Type
from typing import Any, Iterator, Sequence, Text
if sys.version_info >= (3, 0):
from configparser import ConfigParser
@@ -42,7 +42,7 @@ class EntryPoint:
) -> None: ...
def load(self) -> Any: ...
@classmethod
def from_string(cls: Type[Self], epstr: Text, name: Text, distro: Distribution | None = ...) -> Self: ...
def from_string(cls: type[Self], epstr: Text, name: Text, distro: Distribution | None = ...) -> Self: ...
class Distribution:
name: Text

View File

@@ -1,6 +1,5 @@
import sys
from types import TracebackType
from typing import Type
class Timeout(TimeoutError):
def __init__(self, lock_file: str) -> None: ...
@@ -10,7 +9,7 @@ class _Acquire_ReturnProxy:
def __init__(self, lock: str) -> None: ...
def __enter__(self) -> str: ...
def __exit__(
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, traceback: TracebackType | None
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, traceback: TracebackType | None
) -> None: ...
class BaseFileLock:
@@ -27,7 +26,7 @@ class BaseFileLock:
def release(self, force: bool = ...) -> None: ...
def __enter__(self) -> BaseFileLock: ...
def __exit__(
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, traceback: TracebackType | None
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, traceback: TracebackType | None
) -> None: ...
def __del__(self) -> None: ...

View File

@@ -3,12 +3,12 @@
# Therefore typeshed is the best place.
import ast
from typing import Any, ClassVar, Generator, Type
from typing import Any, ClassVar, Generator
class Plugin:
name: ClassVar[str]
version: ClassVar[str]
def __init__(self, tree: ast.AST) -> None: ...
def run(self) -> Generator[tuple[int, int, str, Type[Any]], None, None]: ...
def run(self) -> Generator[tuple[int, int, str, type[Any]], None, None]: ...
def __getattr__(name: str) -> Any: ... # incomplete (other attributes are normally not accessed)

View File

@@ -1,10 +1,10 @@
import ast
from typing import Any, ClassVar, Generator, Type
from typing import Any, ClassVar, Generator
class BuiltinsChecker:
name: ClassVar[str]
version: ClassVar[str]
def __init__(self, tree: ast.AST, filename: str) -> None: ...
def run(self) -> Generator[tuple[int, int, str, Type[Any]], None, None]: ...
def run(self) -> Generator[tuple[int, int, str, type[Any]], None, None]: ...
def __getattr__(name: str) -> Any: ... # incomplete (other attributes are normally not accessed)

View File

@@ -1,6 +1,6 @@
import argparse
import ast
from typing import Any, ClassVar, Generator, Iterable, Type
from typing import Any, ClassVar, Generator, Iterable
class pep257Checker:
name: ClassVar[str]
@@ -14,6 +14,6 @@ class pep257Checker:
def add_options(cls, parser: Any) -> None: ...
@classmethod
def parse_options(cls, options: argparse.Namespace) -> None: ...
def run(self) -> Generator[tuple[int, int, str, Type[Any]], None, None]: ...
def run(self) -> Generator[tuple[int, int, str, type[Any]], None, None]: ...
def __getattr__(name: str) -> Any: ... # incomplete

View File

@@ -1,8 +1,8 @@
import argparse
import ast
from typing import Any, Generic, Iterable, Iterator, Type, TypeVar
from typing import Any, Generic, Iterable, Iterator, TypeVar
FLAKE8_ERROR = tuple[int, int, str, Type[Any]]
FLAKE8_ERROR = tuple[int, int, str, type[Any]]
TConfig = TypeVar("TConfig") # noqa: Y001
class Error:
@@ -19,12 +19,12 @@ class Visitor(ast.NodeVisitor, Generic[TConfig]):
def __init__(self, config: TConfig | None = ...) -> None: ...
@property
def config(self) -> TConfig: ...
def error_from_node(self, error: Type[Error], node: ast.AST, **kwargs: Any) -> None: ...
def error_from_node(self, error: type[Error], node: ast.AST, **kwargs: Any) -> None: ...
class Plugin(Generic[TConfig]):
name: str
version: str
visitors: list[Type[Visitor[TConfig]]]
visitors: list[type[Visitor[TConfig]]]
config: TConfig
def __init__(self, tree: ast.AST) -> None: ...
def run(self) -> Iterable[FLAKE8_ERROR]: ...

View File

@@ -1,8 +1,8 @@
from typing import Any, Type
from typing import Any
from ..plugin import Error as Error, TConfig as TConfig, Visitor as Visitor
def assert_error(
visitor_cls: Type[Visitor[TConfig]], src: str, expected: Type[Error], config: TConfig | None = ..., **kwargs: Any
visitor_cls: type[Visitor[TConfig]], src: str, expected: type[Error], config: TConfig | None = ..., **kwargs: Any
) -> None: ...
def assert_not_error(visitor_cls: Type[Visitor[TConfig]], src: str, config: TConfig | None = ...) -> None: ...
def assert_not_error(visitor_cls: type[Visitor[TConfig]], src: str, config: TConfig | None = ...) -> None: ...

View File

@@ -1,8 +1,8 @@
import ast
from typing import Any, ClassVar, Generator, Type
from typing import Any, ClassVar, Generator
class Plugin:
name: ClassVar[str]
version: ClassVar[str]
def __init__(self, tree: ast.AST) -> None: ...
def run(self) -> Generator[tuple[int, int, str, Type[Any]], None, None]: ...
def run(self) -> Generator[tuple[int, int, str, type[Any]], None, None]: ...

View File

@@ -1,6 +1,6 @@
import argparse
import ast
from typing import Any, ClassVar, Generator, Type
from typing import Any, ClassVar, Generator
class Plugin:
name: ClassVar[str]
@@ -10,6 +10,6 @@ class Plugin:
@classmethod
def parse_options(cls, options: argparse.Namespace) -> None: ...
def __init__(self, tree: ast.AST) -> None: ...
def run(self) -> Generator[tuple[int, int, str, Type[Any]], None, None]: ...
def run(self) -> Generator[tuple[int, int, str, type[Any]], None, None]: ...
def __getattr__(name: str) -> Any: ... # incomplete (other attributes are normally not accessed)

View File

@@ -1,7 +1,7 @@
from collections.abc import Awaitable, Callable, Iterator, Sequence
from datetime import date, datetime, timedelta
from numbers import Real
from typing import Any, Type, TypeVar, Union, overload
from typing import Any, TypeVar, Union, overload
_T = TypeVar("_T")
_Freezable = Union[str, datetime, date, timedelta]
@@ -35,7 +35,7 @@ class _freeze_time:
auto_tick_seconds: float,
) -> None: ...
@overload
def __call__(self, func: Type[_T]) -> Type[_T]: ...
def __call__(self, func: type[_T]) -> type[_T]: ...
@overload
def __call__(self, func: Callable[..., Awaitable[_T]]) -> Callable[..., Awaitable[_T]]: ...
@overload
@@ -44,7 +44,7 @@ class _freeze_time:
def __exit__(self, *args: Any) -> None: ...
def start(self) -> Any: ...
def stop(self) -> None: ...
def decorate_class(self, klass: Type[_T]) -> _T: ...
def decorate_class(self, klass: type[_T]) -> _T: ...
def decorate_coroutine(self, coroutine: _T) -> _T: ...
def decorate_callable(self, func: Callable[..., _T]) -> Callable[..., _T]: ...

View File

@@ -1,5 +1,5 @@
import collections
from typing import Any, Generic, Iterable, Iterator, Mapping, Type, TypeVar, overload
from typing import Any, Generic, Iterable, Iterator, Mapping, TypeVar, overload
_S = TypeVar("_S")
_KT = TypeVar("_KT")
@@ -7,7 +7,7 @@ _VT = TypeVar("_VT")
class frozendict(Mapping[_KT, _VT], Generic[_KT, _VT]):
dict_cls: Type[dict[Any, Any]] = ...
dict_cls: type[dict[Any, Any]] = ...
@overload
def __init__(self, **kwargs: _VT) -> None: ...
@overload
@@ -24,4 +24,4 @@ class frozendict(Mapping[_KT, _VT], Generic[_KT, _VT]):
class FrozenOrderedDict(frozendict[_KT, _VT]):
dict_cls: Type[collections.OrderedDict[Any, Any]] = ...
dict_cls: type[collections.OrderedDict[Any, Any]] = ...

View File

@@ -1,6 +1,6 @@
import datetime
from collections.abc import Iterable, Sequence
from typing import Callable, NoReturn, Type
from typing import Callable, NoReturn
from typing_extensions import Literal
from google.cloud.ndb import exceptions, key as key_module, query as query_module, tasklets as tasklets_module
@@ -96,16 +96,16 @@ class Property(ModelAttribute):
class ModelKey(Property):
def __init__(self) -> None: ...
def __get__(self, entity: Model, unused_cls: Type[Model] | None = ...) -> key_module.Key | list[key_module.Key] | None: ...
def __get__(self, entity: Model, unused_cls: type[Model] | None = ...) -> key_module.Key | list[key_module.Key] | None: ...
class BooleanProperty(Property):
def __get__(self, entity: Model, unused_cls: Type[Model] | None = ...) -> bool | list[bool] | None: ...
def __get__(self, entity: Model, unused_cls: type[Model] | None = ...) -> bool | list[bool] | None: ...
class IntegerProperty(Property):
def __get__(self, entity: Model, unused_cls: Type[Model] | None = ...) -> int | list[int] | None: ...
def __get__(self, entity: Model, unused_cls: type[Model] | None = ...) -> int | list[int] | None: ...
class FloatProperty(Property):
def __get__(self, entity: Model, unused_cls: Type[Model] | None = ...) -> float | list[float] | None: ...
def __get__(self, entity: Model, unused_cls: type[Model] | None = ...) -> float | list[float] | None: ...
class _CompressedValue(bytes):
z_val: bytes = ...
@@ -127,7 +127,7 @@ class BlobProperty(Property):
verbose_name: str | None = ...,
write_empty_list: bool | None = ...,
) -> None: ...
def __get__(self, entity: Model, unused_cls: Type[Model] | None = ...) -> bytes | list[bytes] | None: ...
def __get__(self, entity: Model, unused_cls: type[Model] | None = ...) -> bytes | list[bytes] | None: ...
class CompressedTextProperty(BlobProperty):
def __init__(self, *args, **kwargs) -> None: ...
@@ -135,7 +135,7 @@ class CompressedTextProperty(BlobProperty):
class TextProperty(Property):
def __new__(cls, *args, **kwargs): ...
def __init__(self, *args, **kwargs) -> None: ...
def __get__(self, entity: Model, unused_cls: Type[Model] | None = ...) -> str | list[str] | None: ...
def __get__(self, entity: Model, unused_cls: type[Model] | None = ...) -> str | list[str] | None: ...
class StringProperty(TextProperty):
def __init__(self, *args, **kwargs) -> None: ...
@@ -189,7 +189,7 @@ class KeyProperty(Property):
def __init__(
self,
name: str | None = ...,
kind: Type[Model] | str | None = ...,
kind: type[Model] | str | None = ...,
indexed: bool | None = ...,
repeated: bool | None = ...,
required: bool | None = ...,
@@ -228,7 +228,7 @@ class StructuredProperty(Property):
def IN(self, value: Iterable[object]) -> query_module.DisjunctionNode | query_module.FalseNode: ...
class LocalStructuredProperty(BlobProperty):
def __init__(self, model_class: Type[Model], **kwargs) -> None: ...
def __init__(self, model_class: type[Model], **kwargs) -> None: ...
class GenericProperty(Property):
def __init__(self, name: str | None = ..., compressed: bool = ..., **kwargs) -> None: ...
@@ -252,14 +252,14 @@ class Model(_NotEqualMixin, metaclass=MetaModel):
def __hash__(self) -> NoReturn: ...
def __eq__(self, other: object) -> bool: ...
@classmethod
def gql(cls: Type[Model], query_string: str, *args, **kwargs) -> query_module.Query: ...
def gql(cls: type[Model], query_string: str, *args, **kwargs) -> query_module.Query: ...
def put(self, **kwargs): ...
def put_async(self, **kwargs) -> tasklets_module.Future: ...
@classmethod
def query(cls: Type[Model], *args, **kwargs) -> query_module.Query: ...
def query(cls: type[Model], *args, **kwargs) -> query_module.Query: ...
@classmethod
def allocate_ids(
cls: Type[Model],
cls: type[Model],
size: int | None = ...,
max: int | None = ...,
parent: key_module.Key | None = ...,
@@ -278,7 +278,7 @@ class Model(_NotEqualMixin, metaclass=MetaModel):
) -> tuple[key_module.Key, key_module.Key]: ...
@classmethod
def allocate_ids_async(
cls: Type[Model],
cls: type[Model],
size: int | None = ...,
max: int | None = ...,
parent: key_module.Key | None = ...,
@@ -297,7 +297,7 @@ class Model(_NotEqualMixin, metaclass=MetaModel):
) -> tasklets_module.Future: ...
@classmethod
def get_by_id(
cls: Type[Model],
cls: type[Model],
id: int | str | None,
parent: key_module.Key | None = ...,
namespace: str | None = ...,
@@ -321,7 +321,7 @@ class Model(_NotEqualMixin, metaclass=MetaModel):
) -> tasklets_module.Future: ...
@classmethod
def get_by_id_async(
cls: Type[Model],
cls: type[Model],
id: int | str,
parent: key_module.Key | None = ...,
namespace: str | None = ...,
@@ -345,7 +345,7 @@ class Model(_NotEqualMixin, metaclass=MetaModel):
) -> Model | None: ...
@classmethod
def get_or_insert(
cls: Type[Model],
cls: type[Model],
name: str,
parent: key_module.Key | None = ...,
namespace: str | None = ...,
@@ -370,7 +370,7 @@ class Model(_NotEqualMixin, metaclass=MetaModel):
) -> Model: ...
@classmethod
def get_or_insert_async(
cls: Type[Model],
cls: type[Model],
name: str,
parent: key_module.Key | None = ...,
namespace: str | None = ...,
@@ -407,7 +407,7 @@ class Expando(Model):
def __delattr__(self, name: str) -> None: ...
def get_multi_async(
keys: Sequence[Type[key_module.Key]],
keys: Sequence[type[key_module.Key]],
read_consistency: Literal["EVENTUAL"] | None = ...,
read_policy: Literal["EVENTUAL"] | None = ...,
transaction: bytes | None = ...,
@@ -423,9 +423,9 @@ def get_multi_async(
max_memcache_items: int | None = ...,
force_writes: bool | None = ...,
_options: object | None = ...,
) -> list[Type[tasklets_module.Future]]: ...
) -> list[type[tasklets_module.Future]]: ...
def get_multi(
keys: Sequence[Type[key_module.Key]],
keys: Sequence[type[key_module.Key]],
read_consistency: Literal["EVENTUAL"] | None = ...,
read_policy: Literal["EVENTUAL"] | None = ...,
transaction: bytes | None = ...,
@@ -441,9 +441,9 @@ def get_multi(
max_memcache_items: int | None = ...,
force_writes: bool | None = ...,
_options: object | None = ...,
) -> list[Type[Model] | None]: ...
) -> list[type[Model] | None]: ...
def put_multi_async(
entities: list[Type[Model]],
entities: list[type[Model]],
retries: int | None = ...,
timeout: float | None = ...,
deadline: float | None = ...,

View File

@@ -1,7 +1,7 @@
import decimal
from _typeshed import ReadableBuffer
from datetime import date, datetime, time
from typing import Any, Sequence, Type, overload
from typing import Any, Sequence, overload
from typing_extensions import Literal
from .resultrow import ResultRow
@@ -108,8 +108,8 @@ def Binary(data: ReadableBuffer) -> memoryview: ...
Decimal = decimal.Decimal
NUMBER: Type[int] | Type[float] | Type[complex]
DATETIME: Type[date] | Type[time] | Type[datetime]
NUMBER: type[int] | type[float] | type[complex]
DATETIME: type[date] | type[time] | type[datetime]
STRING = str
BINARY = memoryview
ROWID = int

View File

@@ -1,4 +1,4 @@
from typing import Any, Type
from typing import Any
from typing_extensions import Literal
from .abstract.attrDef import AttrDef as AttrDef
@@ -98,7 +98,7 @@ HASHED_SALTED_SHA384: Literal["SALTED_SHA384"]
HASHED_SALTED_SHA512: Literal["SALTED_SHA512"]
HASHED_SALTED_MD5: Literal["SALTED_MD5"]
NUMERIC_TYPES: tuple[Type[Any], ...]
INTEGER_TYPES: tuple[Type[Any], ...]
STRING_TYPES: tuple[Type[Any], ...]
SEQUENCE_TYPES: tuple[Type[Any], ...]
NUMERIC_TYPES: tuple[type[Any], ...]
INTEGER_TYPES: tuple[type[Any], ...]
STRING_TYPES: tuple[type[Any], ...]
SEQUENCE_TYPES: tuple[type[Any], ...]

View File

@@ -1,6 +1,6 @@
from _typeshed import Self
from types import TracebackType
from typing import Any, Type
from typing import Any
from typing_extensions import Literal
from .server import Server
@@ -101,7 +101,7 @@ class Connection:
def usage(self): ...
def __enter__(self: Self) -> Self: ...
def __exit__(
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
) -> Literal[False] | None: ...
def bind(self, read_server_info: bool = ..., controls: Any | None = ...): ...
def rebind(

View File

@@ -1,5 +1,5 @@
import socket
from typing import Any, Type, TypeVar
from typing import Any, TypeVar
_T = TypeVar("_T")
@@ -7,7 +7,7 @@ class LDAPException(Exception): ...
class LDAPOperationResult(LDAPException):
def __new__(
cls: Type[_T],
cls: type[_T],
result: Any | None = ...,
description: Any | None = ...,
dn: Any | None = ...,

View File

@@ -1,9 +1,9 @@
from collections.abc import Callable, Mapping, Sequence
from typing import Any, Generic, Type, TypeVar, overload
from typing import Any, Generic, TypeVar, overload
_F = TypeVar("_F", bound=Callable[..., Any])
_T = TypeVar("_T")
_TT = TypeVar("_TT", bound=Type[Any])
_TT = TypeVar("_TT", bound=type[Any])
_R = TypeVar("_R")
__all__ = (
@@ -62,10 +62,10 @@ class NonCallableMock(Base, Any):
def __new__(__cls, *args: Any, **kw: Any) -> NonCallableMock: ...
def __init__(
self,
spec: list[str] | object | Type[object] | None = ...,
spec: list[str] | object | type[object] | None = ...,
wraps: Any | None = ...,
name: str | None = ...,
spec_set: list[str] | object | Type[object] | None = ...,
spec_set: list[str] | object | type[object] | None = ...,
parent: NonCallableMock | None = ...,
_spec_state: Any | None = ...,
_new_name: str = ...,
@@ -174,7 +174,7 @@ class _patch_dict:
class _patcher:
TEST_PREFIX: str
dict: Type[_patch_dict]
dict: type[_patch_dict]
@overload
def __call__( # type: ignore[misc]
self,

View File

@@ -1,6 +1,6 @@
import abc
import sys
from typing import Any, Callable, Generic, ItemsView, KeysView, Mapping, Type, TypeVar, ValuesView
from typing import Any, Callable, Generic, ItemsView, KeysView, Mapping, TypeVar, ValuesView
_T = TypeVar("_T")
_U = TypeVar("_U")
@@ -25,7 +25,7 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
def viewvalues(self) -> ValuesView[object]: ...
def __delitem__(self, k: NoReturn) -> None: ...
def TypedDict(typename: str, fields: dict[str, Type[Any]], total: bool = ...) -> Type[dict[str, Any]]: ...
def TypedDict(typename: str, fields: dict[str, type[Any]], total: bool = ...) -> type[dict[str, Any]]: ...
def Arg(type: _T = ..., name: str | None = ...) -> _T: ...
def DefaultArg(type: _T = ..., name: str | None = ...) -> _T: ...
def NamedArg(type: _T = ..., name: str | None = ...) -> _T: ...

View File

@@ -1,5 +1,4 @@
from types import TracebackType
from typing import Type
from .scope_manager import ScopeManager
from .span import Span
@@ -13,5 +12,5 @@ class Scope:
def close(self) -> None: ...
def __enter__(self) -> Scope: ...
def __exit__(
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
) -> None: ...

View File

@@ -1,6 +1,6 @@
from _typeshed import Self
from types import TracebackType
from typing import Any, Type
from typing import Any
from .tracer import Tracer
@@ -23,7 +23,7 @@ class Span:
def get_baggage_item(self, key: str) -> str | None: ...
def __enter__(self: Self) -> Self: ...
def __exit__(
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
) -> None: ...
def log_event(self: Self, event: Any, payload: Any | None = ...) -> Self: ...
def log(self: Self, **kwargs: Any) -> Self: ...

View File

@@ -2,7 +2,7 @@ import builtins
import ctypes
import sys
from types import TracebackType
from typing import Any, Type, TypeVar
from typing import Any, TypeVar
if sys.platform == "win32":
@@ -37,7 +37,7 @@ if sys.platform == "win32":
def write(self, msg: bytes) -> None: ...
def read(self, n: int) -> bytes: ...
def __exit__(
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, tb: TracebackType | None
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, tb: TracebackType | None
) -> None: ...
READ_CONTROL: int
STANDARD_RIGHTS_REQUIRED: int

View File

@@ -1,5 +1,5 @@
from socket import socket
from typing import Iterable, Mapping, NoReturn, Type
from typing import Iterable, Mapping, NoReturn
from paramiko.channel import Channel, ChannelFile, ChannelStderrFile, ChannelStdinFile
from paramiko.hostkeys import HostKeys
@@ -15,7 +15,7 @@ class SSHClient(ClosingContextManager):
def save_host_keys(self, filename: str) -> None: ...
def get_host_keys(self) -> HostKeys: ...
def set_log_channel(self, name: str) -> None: ...
def set_missing_host_key_policy(self, policy: Type[MissingHostKeyPolicy] | MissingHostKeyPolicy) -> None: ...
def set_missing_host_key_policy(self, policy: type[MissingHostKeyPolicy] | MissingHostKeyPolicy) -> None: ...
def connect(
self,
hostname: str,

View File

@@ -1,4 +1,4 @@
from typing import IO, Any, Callable, Sequence, Type
from typing import IO, Any, Callable, Sequence
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve, EllipticCurvePrivateKey, EllipticCurvePublicKey
from cryptography.hazmat.primitives.hashes import HashAlgorithm
@@ -9,15 +9,15 @@ class _ECDSACurve:
nist_name: str
key_length: int
key_format_identifier: str
hash_object: Type[HashAlgorithm]
curve_class: Type[EllipticCurve]
def __init__(self, curve_class: Type[EllipticCurve], nist_name: str) -> None: ...
hash_object: type[HashAlgorithm]
curve_class: type[EllipticCurve]
def __init__(self, curve_class: type[EllipticCurve], nist_name: str) -> None: ...
class _ECDSACurveSet:
ecdsa_curves: Sequence[_ECDSACurve]
def __init__(self, ecdsa_curves: Sequence[_ECDSACurve]) -> None: ...
def get_key_format_identifier_list(self) -> list[str]: ...
def get_by_curve_class(self, curve_class: Type[Any]) -> _ECDSACurve | None: ...
def get_by_curve_class(self, curve_class: type[Any]) -> _ECDSACurve | None: ...
def get_by_key_format_identifier(self, key_format_identifier: str) -> _ECDSACurve | None: ...
def get_by_key_length(self, key_length: int) -> _ECDSACurve | None: ...

View File

@@ -1,4 +1,4 @@
from typing import IO, Pattern, Type, TypeVar
from typing import IO, Pattern, TypeVar
from paramiko.message import Message
@@ -24,9 +24,9 @@ class PKey:
def sign_ssh_data(self, data: bytes) -> Message: ...
def verify_ssh_sig(self, data: bytes, msg: Message) -> bool: ...
@classmethod
def from_private_key_file(cls: Type[_PK], filename: str, password: str | None = ...) -> _PK: ...
def from_private_key_file(cls: type[_PK], filename: str, password: str | None = ...) -> _PK: ...
@classmethod
def from_private_key(cls: Type[_PK], file_obj: IO[str], password: str | None = ...) -> _PK: ...
def from_private_key(cls: type[_PK], file_obj: IO[str], password: str | None = ...) -> _PK: ...
def write_private_key_file(self, filename: str, password: str | None = ...) -> None: ...
def write_private_key(self, file_obj: IO[str], password: str | None = ...) -> None: ...
def load_certificate(self, value: Message | str) -> None: ...

View File

@@ -1,14 +1,14 @@
import sys
from typing import Any, Iterable, Sequence, Text, Type, TypeVar
from typing import Any, Iterable, Sequence, Text, TypeVar
_T = TypeVar("_T")
PY2: bool
string_types: Type[Any] | Sequence[Type[Any]]
text_type: Type[Any] | Sequence[Type[Any]]
bytes_types: Type[Any] | Sequence[Type[Any]]
integer_types: Type[Any] | Sequence[Type[Any]]
string_types: type[Any] | Sequence[type[Any]]
text_type: type[Any] | Sequence[type[Any]]
bytes_types: type[Any] | Sequence[type[Any]]
integer_types: type[Any] | Sequence[type[Any]]
long = int
def input(prompt: Any) -> str: ...

View File

@@ -1,5 +1,5 @@
from logging import Logger
from typing import Any, Type
from typing import Any
from paramiko.channel import Channel
from paramiko.server import ServerInterface, SubsystemHandler
@@ -18,7 +18,7 @@ class SFTPServer(BaseSFTP, SubsystemHandler):
server: SFTPServerInterface
sock: Channel | None
def __init__(
self, channel: Channel, name: str, server: ServerInterface, sftp_si: Type[SFTPServerInterface], *largs: Any, **kwargs: Any
self, channel: Channel, name: str, server: ServerInterface, sftp_si: type[SFTPServerInterface], *largs: Any, **kwargs: Any
) -> None: ...
def start_subsystem(self, name: str, transport: Transport, channel: Channel) -> None: ...
def finish_subsystem(self) -> None: ...

View File

@@ -1,7 +1,7 @@
from typing import Any, Type
from typing import Any
GSS_AUTH_AVAILABLE: bool
GSS_EXCEPTIONS: tuple[Type[Exception], ...]
GSS_EXCEPTIONS: tuple[type[Exception], ...]
def GSSAuth(auth_method: str, gss_deleg_creds: bool = ...) -> _SSH_GSSAuth: ...

View File

@@ -2,7 +2,7 @@ from logging import Logger
from socket import socket
from threading import Condition, Event, Lock, Thread
from types import ModuleType
from typing import Any, Callable, Iterable, Protocol, Sequence, Type
from typing import Any, Callable, Iterable, Protocol, Sequence
from paramiko.auth_handler import AuthHandler, _InteractiveCallback
from paramiko.channel import Channel
@@ -67,7 +67,7 @@ class Transport(Thread, ClosingContextManager):
server_key_dict: dict[str, PKey]
server_accepts: list[Channel]
server_accept_cv: Condition
subsystem_table: dict[str, tuple[Type[SubsystemHandler], tuple[Any, ...], dict[str, Any]]]
subsystem_table: dict[str, tuple[type[SubsystemHandler], tuple[Any, ...], dict[str, Any]]]
sys: ModuleType
def __init__(
self,
@@ -138,7 +138,7 @@ class Transport(Thread, ClosingContextManager):
gss_trust_dns: bool = ...,
) -> None: ...
def get_exception(self) -> Exception | None: ...
def set_subsystem_handler(self, name: str, handler: Type[SubsystemHandler], *larg: Any, **kwarg: Any) -> None: ...
def set_subsystem_handler(self, name: str, handler: type[SubsystemHandler], *larg: Any, **kwarg: Any) -> None: ...
def is_authenticated(self) -> bool: ...
def get_username(self) -> str | None: ...
def get_banner(self) -> bytes | None: ...

View File

@@ -1,7 +1,7 @@
import sys
from logging import Logger, LogRecord
from types import TracebackType
from typing import IO, AnyStr, Callable, Protocol, Type, TypeVar
from typing import IO, AnyStr, Callable, Protocol, TypeVar
from paramiko.config import SSHConfig, SSHConfigDict
from paramiko.hostkeys import HostKeys
@@ -28,7 +28,7 @@ def format_binary_line(data: bytes) -> str: ...
def safe_string(s: bytes) -> bytes: ...
def bit_length(n: int) -> int: ...
def tb_strings() -> list[str]: ...
def generate_key_bytes(hash_alg: Type[_Hash], salt: bytes, key: bytes | str, nbytes: int) -> bytes: ...
def generate_key_bytes(hash_alg: type[_Hash], salt: bytes, key: bytes | str, nbytes: int) -> bytes: ...
def load_host_keys(filename: str) -> HostKeys: ...
def parse_ssh_config(file_obj: IO[str]) -> SSHConfig: ...
def lookup_ssh_host_config(hostname: str, config: SSHConfig) -> SSHConfigDict: ...
@@ -46,7 +46,7 @@ def constant_time_bytes_eq(a: AnyStr, b: AnyStr) -> bool: ...
class ClosingContextManager:
def __enter__(self: _TC) -> _TC: ...
def __exit__(
self, type: Type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
) -> None: ...
def clamp_value(minimum: int, val: int, maximum: int) -> int: ...

View File

@@ -1,5 +1,5 @@
import textwrap
from typing import IO, Any, Callable, Generic, Text, Type, TypeVar, overload
from typing import IO, Any, Callable, Generic, Text, TypeVar, overload
from typing_extensions import SupportsIndex
_TB = TypeVar("_TB", bound="_BaseEntry")
@@ -12,11 +12,11 @@ default_encoding: str
# encoding: str
# check_for_duplicates: bool
@overload
def pofile(pofile: Text, *, klass: Type[_TP], **kwargs: Any) -> _TP: ...
def pofile(pofile: Text, *, klass: type[_TP], **kwargs: Any) -> _TP: ...
@overload
def pofile(pofile: Text, **kwargs: Any) -> POFile: ...
@overload
def mofile(mofile: Text, *, klass: Type[_TM], **kwargs: Any) -> _TM: ...
def mofile(mofile: Text, *, klass: type[_TM], **kwargs: Any) -> _TM: ...
@overload
def mofile(mofile: Text, **kwargs: Any) -> MOFile: ...
def detect_encoding(file: bytes | Text, binary_mode: bool = ...) -> str: ...

View File

@@ -1,6 +1,6 @@
from stat import S_IMODE as S_IMODE
from types import TracebackType
from typing import IO, Any, Callable, ContextManager, Sequence, Text, Type, Union
from typing import IO, Any, Callable, ContextManager, Sequence, Text, Union
from typing_extensions import Literal
import paramiko
@@ -122,5 +122,5 @@ class Connection:
def __del__(self) -> None: ...
def __enter__(self) -> "Connection": ...
def __exit__(
self, etype: Type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
self, etype: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
) -> None: ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Type
from typing import Any
from pyVmomi.vim import ManagedEntity
@@ -12,4 +12,4 @@ class ViewManager:
# but in practice it seems to be `list[Type[ManagedEntity]]`
# Source: https://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.view.ViewManager.html
@staticmethod
def CreateContainerView(container: ManagedEntity, type: list[Type[ManagedEntity]], recursive: bool) -> ContainerView: ...
def CreateContainerView(container: ManagedEntity, type: list[type[ManagedEntity]], recursive: bool) -> ContainerView: ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Type
from typing import Any
from pyVmomi.vim import ManagedEntity
from pyVmomi.vim.view import ContainerView
@@ -6,17 +6,17 @@ from pyVmomi.vmodl import DynamicProperty
class PropertyCollector:
class PropertySpec:
def __init__(self, *, all: bool = ..., type: Type[ManagedEntity] = ..., pathSet: list[str] = ...) -> None: ...
def __init__(self, *, all: bool = ..., type: type[ManagedEntity] = ..., pathSet: list[str] = ...) -> None: ...
all: bool
type: Type[ManagedEntity]
type: type[ManagedEntity]
pathSet: list[str]
class TraversalSpec:
def __init__(
self, *, path: str = ..., skip: bool = ..., type: Type[ContainerView] = ..., **kwargs: Any # incomplete
self, *, path: str = ..., skip: bool = ..., type: type[ContainerView] = ..., **kwargs: Any # incomplete
) -> None: ...
path: str
skip: bool
type: Type[ContainerView]
type: type[ContainerView]
def __getattr__(self, name: str) -> Any: ... # incomplete
class RetrieveOptions:
def __init__(self, *, maxObjects: int) -> None: ...

View File

@@ -1,21 +1,7 @@
import threading
from _typeshed import Self, SupportsItems
from datetime import datetime, timedelta
from typing import (
Any,
Callable,
ClassVar,
Generic,
Iterable,
Iterator,
Mapping,
Pattern,
Sequence,
Type,
TypeVar,
Union,
overload,
)
from typing import Any, Callable, ClassVar, Generic, Iterable, Iterator, Mapping, Pattern, Sequence, TypeVar, Union, overload
from typing_extensions import Literal
from .commands import CoreCommands, RedisModuleCommands, SentinelCommands
@@ -273,7 +259,7 @@ class Redis(RedisModuleCommands, CoreCommands[_StrType], SentinelCommands, Gener
timeout: float | None,
sleep: float,
blocking_timeout: float | None,
lock_class: Type[_LockType],
lock_class: type[_LockType],
thread_local: bool = ...,
) -> _LockType: ...
@overload
@@ -284,7 +270,7 @@ class Redis(RedisModuleCommands, CoreCommands[_StrType], SentinelCommands, Gener
sleep: float = ...,
blocking_timeout: float | None = ...,
*,
lock_class: Type[_LockType],
lock_class: type[_LockType],
thread_local: bool = ...,
) -> _LockType: ...
def pubsub(self, *, shard_hint: Any = ..., ignore_subscribe_messages: bool = ...) -> PubSub: ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Mapping, Type
from typing import Any, Mapping
from .retry import Retry
@@ -87,7 +87,7 @@ class Connection:
encoding: str = ...,
encoding_errors: str = ...,
decode_responses: bool = ...,
parser_class: Type[BaseParser] = ...,
parser_class: type[BaseParser] = ...,
socket_read_size: int = ...,
health_check_interval: int = ...,
client_name: str | None = ...,

View File

@@ -1,5 +1,5 @@
from types import TracebackType
from typing import Any, ClassVar, Protocol, Type
from typing import Any, ClassVar, Protocol
from redis.client import Redis
@@ -27,7 +27,7 @@ class Lock:
def register_scripts(self) -> None: ...
def __enter__(self) -> Lock: ...
def __exit__(
self, exc_type: Type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
) -> bool | None: ...
def acquire(
self, blocking: bool | None = ..., blocking_timeout: None | int | float = ..., token: str | bytes | None = ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Type, TypeVar, overload
from typing import Any, TypeVar, overload
from typing_extensions import Literal
from redis.client import Redis
@@ -47,9 +47,9 @@ class Sentinel(SentinelCommands):
@overload
def master_for(self, service_name: str, *, connection_pool_class=..., **kwargs) -> Redis[Any]: ...
@overload
def master_for(self, service_name: str, redis_class: Type[_Redis] = ..., connection_pool_class=..., **kwargs) -> _Redis: ...
def master_for(self, service_name: str, redis_class: type[_Redis] = ..., connection_pool_class=..., **kwargs) -> _Redis: ...
@overload
def slave_for(self, service_name: str, connection_pool_class=..., **kwargs) -> Redis[Any]: ...
@overload
def slave_for(self, service_name: str, redis_class: Type[_Redis] = ..., connection_pool_class=..., **kwargs) -> _Redis: ...
def slave_for(self, service_name: str, redis_class: type[_Redis] = ..., connection_pool_class=..., **kwargs) -> _Redis: ...
def execute_command(self, *args, **kwargs) -> Literal[True]: ...

View File

@@ -1,6 +1,6 @@
import datetime
from json import JSONDecoder
from typing import Any, Callable, Iterator, Text, Type, TypeVar
from typing import Any, Callable, Iterator, Text, TypeVar
from urllib3 import exceptions as urllib3_exceptions, fields, filepost, util
@@ -129,7 +129,7 @@ class Response:
def json(
self,
*,
cls: Type[JSONDecoder] | None = ...,
cls: type[JSONDecoder] | None = ...,
object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
parse_float: Callable[[str], Any] | None = ...,
parse_int: Callable[[str], Any] | None = ...,

View File

@@ -1,6 +1,6 @@
from _typeshed import IdentityFunction
from logging import Logger
from typing import Any, Callable, Sequence, Type, TypeVar
from typing import Any, Callable, Sequence, TypeVar
_R = TypeVar("_R")
@@ -8,7 +8,7 @@ def retry_call(
f: Callable[..., _R],
fargs: Sequence[Any] | None = ...,
fkwargs: dict[str, Any] | None = ...,
exceptions: Type[Exception] | tuple[Type[Exception], ...] = ...,
exceptions: type[Exception] | tuple[type[Exception], ...] = ...,
tries: int = ...,
delay: float = ...,
max_delay: float | None = ...,
@@ -17,7 +17,7 @@ def retry_call(
logger: Logger | None = ...,
) -> _R: ...
def retry(
exceptions: Type[Exception] | tuple[Type[Exception], ...] = ...,
exceptions: type[Exception] | tuple[type[Exception], ...] = ...,
tries: int = ...,
delay: float = ...,
max_delay: float | None = ...,

View File

@@ -1,7 +1,7 @@
from abc import abstractmethod
from collections.abc import Iterable, Mapping
from distutils.core import Command as _Command
from typing import Any, Type
from typing import Any
from setuptools._deprecation_warning import SetuptoolsDeprecationWarning as SetuptoolsDeprecationWarning
from setuptools.depends import Require as Require
@@ -36,14 +36,14 @@ def setup(
scripts: list[str] = ...,
ext_modules: list[Extension] = ...,
classifiers: list[str] = ...,
distclass: Type[Distribution] = ...,
distclass: type[Distribution] = ...,
script_name: str = ...,
script_args: list[str] = ...,
options: Mapping[str, Any] = ...,
license: str = ...,
keywords: list[str] | str = ...,
platforms: list[str] | str = ...,
cmdclass: Mapping[str, Type[Command]] = ...,
cmdclass: Mapping[str, type[Command]] = ...,
data_files: list[tuple[str, list[str]]] = ...,
package_dir: Mapping[str, str] = ...,
obsoletes: list[str] = ...,

View File

@@ -8,7 +8,7 @@ from collections.abc import Callable, ItemsView, Iterable, Iterator as _Iterator
from functools import wraps as wraps
from importlib.util import spec_from_loader as spec_from_loader
from io import BytesIO as BytesIO, StringIO as StringIO
from typing import Any, AnyStr, NoReturn, Pattern, Type, TypeVar, overload
from typing import Any, AnyStr, NoReturn, Pattern, TypeVar, overload
from typing_extensions import Literal
from . import moves as moves
@@ -24,9 +24,9 @@ PY2: Literal[False]
PY3: Literal[True]
PY34: Literal[True]
string_types: tuple[Type[str]]
integer_types: tuple[Type[int]]
class_types: tuple[Type[Type[Any]]]
string_types: tuple[type[str]]
integer_types: tuple[type[int]]
class_types: tuple[type[type[Any]]]
text_type = str
binary_type = bytes
@@ -77,8 +77,8 @@ def assertRegex(
exec_ = exec
def reraise(tp: Type[BaseException] | None, value: BaseException | None, tb: types.TracebackType | None = ...) -> NoReturn: ...
def raise_from(value: BaseException | Type[BaseException], from_value: BaseException | None) -> NoReturn: ...
def reraise(tp: type[BaseException] | None, value: BaseException | None, tb: types.TracebackType | None = ...) -> NoReturn: ...
def raise_from(value: BaseException | type[BaseException], from_value: BaseException | None) -> NoReturn: ...
print_ = print

View File

@@ -1,6 +1,6 @@
import sys
from _typeshed import StrPath, SupportsWrite
from typing import IO, Any, Mapping, MutableMapping, Text, Type, Union
from typing import IO, Any, Mapping, MutableMapping, Text, Union
if sys.version_info >= (3, 6):
_PathLike = StrPath
@@ -13,7 +13,7 @@ else:
class TomlDecodeError(Exception): ...
def load(f: _PathLike | list[Text] | IO[str], _dict: Type[MutableMapping[str, Any]] = ...) -> MutableMapping[str, Any]: ...
def loads(s: Text, _dict: Type[MutableMapping[str, Any]] = ...) -> MutableMapping[str, Any]: ...
def load(f: _PathLike | list[Text] | IO[str], _dict: type[MutableMapping[str, Any]] = ...) -> MutableMapping[str, Any]: ...
def loads(s: Text, _dict: type[MutableMapping[str, Any]] = ...) -> MutableMapping[str, Any]: ...
def dump(o: Mapping[str, Any], f: SupportsWrite[str]) -> str: ...
def dumps(o: Mapping[str, Any]) -> str: ...