Big diff: use lower-case list and dict (#5888)

This commit is contained in:
Akuli
2021-08-08 19:26:35 +03:00
committed by GitHub
parent 11f54c3407
commit ce11072dbe
325 changed files with 2196 additions and 2334 deletions

View File

@@ -71,11 +71,11 @@ class Flask(_PackageBoundObject):
view_functions: Any = ...
error_handler_spec: Any = ...
url_build_error_handlers: Any = ...
before_request_funcs: Dict[str | None, List[Callable[[], Any]]] = ...
before_first_request_funcs: List[Callable[[], None]] = ...
after_request_funcs: Dict[str | None, List[Callable[[Response], Response]]] = ...
teardown_request_funcs: Dict[str | None, List[Callable[[Exception | None], Any]]] = ...
teardown_appcontext_funcs: List[Callable[[Exception | None], Any]] = ...
before_request_funcs: dict[str | None, list[Callable[[], Any]]] = ...
before_first_request_funcs: list[Callable[[], None]] = ...
after_request_funcs: dict[str | None, list[Callable[[Response], Response]]] = ...
teardown_request_funcs: dict[str | None, list[Callable[[Exception | None], Any]]] = ...
teardown_appcontext_funcs: list[Callable[[Exception | None], Any]] = ...
url_value_preprocessors: Any = ...
url_default_functions: Any = ...
template_context_processors: Any = ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Dict
from typing import Any
from werkzeug.exceptions import HTTPException
from werkzeug.routing import Rule
@@ -14,7 +14,7 @@ class JSONMixin:
class Request(RequestBase, JSONMixin):
url_rule: Rule | None = ...
view_args: Dict[str, Any] = ...
view_args: dict[str, Any] = ...
routing_exception: HTTPException | None = ...
# Request is making the max_content_length readonly, where it was not the
# case in its supertype.

View File

@@ -1,4 +1,4 @@
from typing import Any, Callable, Dict, Generator, Iterable, Iterator, List, Sequence, Tuple, overload
from typing import Any, Callable, Generator, Iterable, Iterator, Sequence, Tuple, overload
_NDArray = Any # FIXME: no typings for numpy arrays
@@ -94,7 +94,7 @@ class Client:
@transport_frame.setter
def transport_frame(self, frame: int) -> None: ...
def transport_locate(self, frame: int) -> None: ...
def transport_query(self) -> Tuple[TransportState, Dict[str, Any]]: ...
def transport_query(self) -> Tuple[TransportState, dict[str, Any]]: ...
def transport_query_struct(self) -> Tuple[TransportState, _JackPositionT]: ...
def transport_reposition_struct(self, position: _JackPositionT) -> None: ... # TODO
def set_sync_timeout(self, timeout: int) -> None: ...
@@ -125,7 +125,7 @@ class Client:
def get_uuid_for_client_name(self, name: str) -> str: ...
def get_client_name_by_uuid(self, uuid: str) -> str: ...
def get_port_by_name(self, name: str) -> Port: ...
def get_all_connections(self, port: Port) -> List[Port]: ...
def get_all_connections(self, port: Port) -> list[Port]: ...
def get_ports(
self,
name_pattern: str = ...,
@@ -136,7 +136,7 @@ class Client:
is_physical: bool = ...,
can_monitor: bool = ...,
is_terminal: bool = ...,
) -> List[Port]: ...
) -> list[Port]: ...
def set_property(self, subject: int | str, key: str, value: str | bytes, type: str = ...) -> None: ...
def remove_property(self, subject: int | str, key: str) -> None: ...
def remove_properties(self, subject: int | str) -> int: ...
@@ -153,7 +153,7 @@ class Port:
@shortname.setter
def shortname(self, shortname: str) -> None: ...
@property
def aliases(self) -> List[str]: ...
def aliases(self) -> list[str]: ...
def set_alias(self, alias: str) -> None: ...
def unset_alias(self, alias: str) -> None: ...
@property
@@ -180,7 +180,7 @@ class OwnPort(Port):
@property
def number_of_connections(self) -> int: ...
@property
def connections(self) -> List[Port]: ...
def connections(self) -> list[Port]: ...
def is_connected_to(self, port: str | Port) -> bool: ...
def connect(self, port: str | Port) -> None: ...
def disconnect(self, other: str | Port | None = ...) -> None: ...
@@ -266,9 +266,9 @@ class TransportState:
class CallbackExit(Exception): ...
def get_property(subject: int | str, key: str) -> Tuple[bytes, str] | None: ...
def get_properties(subject: int | str) -> Dict[str, Tuple[bytes, str]]: ...
def get_all_properties() -> Dict[str, Dict[str, Tuple[bytes, str]]]: ...
def position2dict(pos: _JackPositionT) -> Dict[str, Any]: ...
def get_properties(subject: int | str) -> dict[str, Tuple[bytes, str]]: ...
def get_all_properties() -> dict[str, dict[str, Tuple[bytes, str]]]: ...
def position2dict(pos: _JackPositionT) -> dict[str, Any]: ...
def version() -> Tuple[int, int, int, int]: ...
def version_string() -> str: ...
def client_name_size() -> int: ...

View File

@@ -18,5 +18,5 @@ TRIM_BLOCKS: bool
LSTRIP_BLOCKS: bool
NEWLINE_SEQUENCE: str
KEEP_TRAILING_NEWLINE: bool
DEFAULT_NAMESPACE: Dict[str, Any]
DEFAULT_NAMESPACE: dict[str, Any]
DEFAULT_POLICIES = Dict[str, Any]

View File

@@ -1,5 +1,5 @@
import sys
from typing import Any, Callable, Dict, Iterator, List, Sequence, Text, Type
from typing import Any, Callable, Iterator, Sequence, Text, Type
from .bccache import BytecodeCache
from .loaders import BaseLoader
@@ -40,12 +40,12 @@ class Environment:
autoescape: Any
filters: Any
tests: Any
globals: Dict[str, Any]
globals: dict[str, Any]
loader: BaseLoader
cache: Any
bytecode_cache: BytecodeCache
auto_reload: bool
extensions: List[Any]
extensions: list[Any]
def __init__(
self,
block_start_string: Text = ...,
@@ -60,7 +60,7 @@ class Environment:
lstrip_blocks: bool = ...,
newline_sequence: Text = ...,
keep_trailing_newline: bool = ...,
extensions: List[Any] = ...,
extensions: list[Any] = ...,
optimized: bool = ...,
undefined: Type[Undefined] = ...,
finalize: Callable[..., Any] | None = ...,
@@ -85,7 +85,7 @@ class Environment:
line_comment_prefix: Text = ...,
trim_blocks: bool = ...,
lstrip_blocks: bool = ...,
extensions: List[Any] = ...,
extensions: list[Any] = ...,
optimized: bool = ...,
undefined: Type[Undefined] = ...,
finalize: Callable[..., Any] = ...,
@@ -123,18 +123,18 @@ class Environment:
def join_path(self, template: Template | Text, parent: Text) -> Text: ...
def get_template(self, name: Template | Text, parent: Text | None = ..., globals: Any | None = ...) -> Template: ...
def select_template(
self, names: Sequence[Template | Text], parent: Text | None = ..., globals: Dict[str, Any] | None = ...
self, names: Sequence[Template | Text], parent: Text | None = ..., globals: dict[str, Any] | None = ...
) -> Template: ...
def get_or_select_template(
self,
template_name_or_list: Template | Text | Sequence[Template | Text],
parent: Text | None = ...,
globals: Dict[str, Any] | None = ...,
globals: dict[str, Any] | None = ...,
) -> Template: ...
def from_string(
self, source: Text, globals: Dict[str, Any] | None = ..., template_class: Type[Template] | None = ...
self, source: Text, globals: dict[str, Any] | None = ..., template_class: Type[Template] | None = ...
) -> Template: ...
def make_globals(self, d: Dict[str, Any] | None) -> Dict[str, Any]: ...
def make_globals(self, d: dict[str, Any] | None) -> dict[str, Any]: ...
# Frequently added extensions are included here:
# from InternationalizationExtension:
def install_gettext_translations(self, translations: Any, newstyle: bool | None = ...): ...
@@ -179,10 +179,10 @@ class Template:
def stream(self, *args, **kwargs) -> TemplateStream: ...
def generate(self, *args, **kwargs) -> Iterator[Text]: ...
def new_context(
self, vars: Dict[str, Any] | None = ..., shared: bool = ..., locals: Dict[str, Any] | None = ...
self, vars: dict[str, Any] | None = ..., shared: bool = ..., locals: dict[str, Any] | None = ...
) -> Context: ...
def make_module(
self, vars: Dict[str, Any] | None = ..., shared: bool = ..., locals: Dict[str, Any] | None = ...
self, vars: dict[str, Any] | None = ..., shared: bool = ..., locals: dict[str, Any] | None = ...
) -> Context: ...
@property
def module(self) -> Any: ...

View File

@@ -1,6 +1,6 @@
import sys
from types import ModuleType
from typing import Any, Callable, Iterable, List, Text, Tuple, Union
from typing import Any, Callable, Iterable, Text, Tuple, Union
from .environment import Environment
@@ -11,7 +11,7 @@ if sys.version_info >= (3, 7):
else:
_SearchPath = Union[Text, Iterable[Text]]
def split_template_path(template: Text) -> List[Text]: ...
def split_template_path(template: Text) -> list[Text]: ...
class BaseLoader:
has_source_access: bool

View File

@@ -1,4 +1,4 @@
from typing import Any, Dict, Text
from typing import Any, Text
from jinja2.environment import Environment
from jinja2.exceptions import TemplateNotFound as TemplateNotFound, TemplateRuntimeError as TemplateRuntimeError
@@ -15,15 +15,15 @@ class TemplateReference:
def __getitem__(self, name): ...
class Context:
parent: Context | Dict[str, Any]
vars: Dict[str, Any]
parent: Context | dict[str, Any]
vars: dict[str, Any]
environment: Environment
eval_ctx: Any
exported_vars: Any
name: Text
blocks: Dict[str, Any]
blocks: dict[str, Any]
def __init__(
self, environment: Environment, parent: Context | Dict[str, Any], name: Text, blocks: Dict[str, Any]
self, environment: Environment, parent: Context | dict[str, Any], name: Text, blocks: dict[str, Any]
) -> None: ...
def super(self, name, current): ...
def get(self, key, default: Any | None = ...): ...

View File

@@ -1,4 +1,4 @@
from typing import Any, BinaryIO, Callable, ClassVar, Dict, List, Mapping, Sequence, Text, TextIO
from typing import Any, BinaryIO, Callable, ClassVar, Mapping, Sequence, Text, TextIO
from typing_extensions import Literal
from xml.etree.ElementTree import Element
@@ -13,11 +13,11 @@ class Markdown:
postprocessors: Registry
parser: BlockParser
htmlStash: HtmlStash
output_formats: ClassVar[Dict[Literal["xhtml", "html"], Callable[[Element], Text]]]
output_formats: ClassVar[dict[Literal["xhtml", "html"], Callable[[Element], Text]]]
output_format: Literal["xhtml", "html"]
serializer: Callable[[Element], Text]
tab_length: int
block_level_elements: List[str]
block_level_elements: list[str]
def __init__(
self,
*,

View File

@@ -1,13 +1,13 @@
from typing import Any, Dict, List, Mapping, Tuple
from typing import Any, Mapping, Tuple
from markdown.core import Markdown
class Extension:
config: Mapping[str, List[Any]] = ...
config: Mapping[str, list[Any]] = ...
def __init__(self, **kwargs: Any) -> None: ...
def getConfig(self, key: str, default: Any = ...) -> Any: ...
def getConfigs(self) -> Dict[str, Any]: ...
def getConfigInfo(self) -> List[Tuple[str, str]]: ...
def getConfigs(self) -> dict[str, Any]: ...
def getConfigInfo(self) -> list[Tuple[str, str]]: ...
def setConfig(self, key: str, value: Any) -> None: ...
def setConfigs(self, items: Mapping[str, Any]) -> None: ...
def extendMarkdown(self, md: Markdown) -> None: ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Dict
from typing import Any
from markdown.extensions import Extension
from markdown.treeprocessors import Treeprocessor
@@ -18,7 +18,7 @@ class CodeHilite:
tab_length: Any
hl_lines: Any
use_pygments: Any
options: Dict[str, Any]
options: dict[str, Any]
def __init__(
self,
src: Any | None = ...,

View File

@@ -1,11 +1,11 @@
from typing import Any, List, Pattern
from typing import Any, Pattern
from . import util
def build_preprocessors(md, **kwargs): ...
class Preprocessor(util.Processor):
def run(self, lines: List[str]) -> List[str]: ...
def run(self, lines: list[str]) -> list[str]: ...
class NormalizeWhitespace(Preprocessor): ...

View File

@@ -1,3 +1,3 @@
from typing import Dict, Text
from typing import Text
HTML_ENTITIES: Dict[Text, int]
HTML_ENTITIES: dict[Text, int]

View File

@@ -1,5 +1,5 @@
import builtins
from typing import Dict, NoReturn, Type
from typing import NoReturn, Type
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,4 +1,4 @@
from typing import Any, Dict
from typing import Any
from yaml.error import MarkedYAMLError
from yaml.nodes import MappingNode, Node, ScalarNode, SequenceNode
@@ -6,13 +6,13 @@ from yaml.nodes import MappingNode, Node, ScalarNode, SequenceNode
class ComposerError(MarkedYAMLError): ...
class Composer:
anchors: Dict[Any, Node]
anchors: dict[Any, Node]
def __init__(self) -> None: ...
def check_node(self) -> bool: ...
def get_node(self) -> Node | None: ...
def get_single_node(self) -> Node | None: ...
def compose_document(self) -> Node | None: ...
def compose_node(self, parent: Node | None, index: int) -> Node | None: ...
def compose_scalar_node(self, anchor: Dict[Any, Node]) -> ScalarNode: ...
def compose_sequence_node(self, anchor: Dict[Any, Node]) -> SequenceNode: ...
def compose_mapping_node(self, anchor: Dict[Any, Node]) -> MappingNode: ...
def compose_scalar_node(self, anchor: dict[Any, Node]) -> ScalarNode: ...
def compose_sequence_node(self, anchor: dict[Any, Node]) -> SequenceNode: ...
def compose_mapping_node(self, anchor: dict[Any, Node]) -> MappingNode: ...

View File

@@ -1,5 +1,5 @@
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
from typing import Any, Iterable, List, Mapping, Set, Text
from typing import Any, Iterable, Mapping, Set, Text
from ..middleware.proxy_fix import ProxyFix as ProxyFix
@@ -19,7 +19,7 @@ class PathInfoFromRequestUriFix(object):
class HeaderRewriterFix(object):
app: WSGIApplication
remove_headers: Set[Text]
add_headers: List[Text]
add_headers: list[Text]
def __init__(
self, app: WSGIApplication, remove_headers: Iterable[Text] | None = ..., add_headers: Iterable[Text] | None = ...
) -> None: ...

View File

@@ -36,7 +36,7 @@ def native_itermethods(names): ...
class ImmutableListMixin(Generic[_V]):
def __hash__(self) -> int: ...
def __reduce_ex__(self: _D, protocol) -> Tuple[Type[_D], List[_V]]: ...
def __reduce_ex__(self: _D, protocol) -> Tuple[Type[_D], list[_V]]: ...
def __delitem__(self, key: _V) -> NoReturn: ...
def __iadd__(self, other: Any) -> NoReturn: ...
def __imul__(self, other: Any) -> NoReturn: ...
@@ -284,7 +284,7 @@ class Accept(ImmutableList[Tuple[str, float]]):
@overload
def __getitem__(self, key: SupportsIndex) -> Tuple[str, float]: ...
@overload
def __getitem__(self, s: slice) -> List[Tuple[str, float]]: ...
def __getitem__(self, s: slice) -> list[Tuple[str, float]]: ...
@overload
def __getitem__(self, key: str) -> float: ...
def quality(self, key: str) -> float: ...
@@ -465,7 +465,7 @@ class FileStorage(object):
@property
def mimetype(self) -> str: ...
@property
def mimetype_params(self) -> Dict[str, str]: ...
def mimetype_params(self) -> dict[str, str]: ...
def save(self, dst: Text | SupportsWrite[bytes], buffer_size: int = ...): ...
def close(self) -> None: ...
def __nonzero__(self) -> bool: ...

View File

@@ -1,6 +1,6 @@
import datetime
from _typeshed.wsgi import StartResponse, WSGIEnvironment
from typing import Any, Dict, Iterable, List, NoReturn, Protocol, Text, Tuple, Type
from typing import Any, Iterable, NoReturn, Protocol, Text, Tuple, Type
from werkzeug.wrappers import Response
@@ -19,11 +19,11 @@ class HTTPException(Exception):
def name(self) -> str: ...
def get_description(self, environ: WSGIEnvironment | None = ...) -> Text: ...
def get_body(self, environ: WSGIEnvironment | None = ...) -> Text: ...
def get_headers(self, environ: WSGIEnvironment | None = ...) -> List[Tuple[str, str]]: ...
def get_headers(self, environ: WSGIEnvironment | None = ...) -> list[Tuple[str, str]]: ...
def get_response(self, environ: WSGIEnvironment | _EnvironContainer | None = ...) -> Response: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...
default_exceptions: Dict[int, Type[HTTPException]]
default_exceptions: dict[int, Type[HTTPException]]
class BadRequest(HTTPException):
code: int
@@ -41,7 +41,7 @@ class Unauthorized(HTTPException):
self,
description: Text | None = ...,
response: Response | None = ...,
www_authenticate: None | Tuple[object, ...] | List[object] | object = ...,
www_authenticate: None | Tuple[object, ...] | list[object] | object = ...,
) -> None: ...
class Forbidden(HTTPException):

View File

@@ -1,5 +1,5 @@
from _typeshed.wsgi import WSGIEnvironment
from typing import IO, Any, Callable, Dict, Generator, Iterable, Mapping, NoReturn, Optional, Protocol, Text, Tuple, TypeVar
from typing import IO, Any, Callable, Generator, Iterable, Mapping, NoReturn, Optional, Protocol, Text, Tuple, TypeVar
from .datastructures import Headers
@@ -51,7 +51,7 @@ class FormDataParser(object):
def parse(
self, stream: IO[bytes], mimetype: Text, content_length: int | None, options: Mapping[str, str] | None = ...
) -> Tuple[IO[bytes], _Dict, _Dict]: ...
parse_functions: Dict[Text, _ParseFunc]
parse_functions: dict[Text, _ParseFunc]
def is_valid_multipart_boundary(boundary: str) -> bool: ...
def parse_multipart_headers(iterable: Iterable[Text | bytes]) -> Headers: ...

View File

@@ -1,12 +1,12 @@
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
from typing import Any, Dict, Iterable, Mapping, MutableMapping, Text
from typing import Any, Iterable, Mapping, MutableMapping, Text
_Opts = Mapping[Text, Any]
_MutableOpts = MutableMapping[Text, Any]
class ProxyMiddleware(object):
app: WSGIApplication
targets: Dict[Text, _MutableOpts]
targets: dict[Text, _MutableOpts]
def __init__(
self, app: WSGIApplication, targets: Mapping[Text, _MutableOpts], chunk_size: int = ..., timeout: int = ...
) -> None: ...

View File

@@ -1,7 +1,7 @@
import sys
from _typeshed import SupportsWrite
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
from typing import Any, Iterable, Iterator, List, Mapping, Protocol, Tuple
from typing import Any, Iterable, Iterator, Mapping, Protocol, Tuple
from ..datastructures import Headers
@@ -36,14 +36,14 @@ class ErrorStream(object):
def close(self) -> None: ...
class GuardedWrite(object):
def __init__(self, write: SupportsWrite[str], chunks: List[int]) -> None: ...
def __init__(self, write: SupportsWrite[str], chunks: list[int]) -> None: ...
def __call__(self, s: str) -> None: ...
class GuardedIterator(object):
closed: bool
headers_set: bool
chunks: List[int]
def __init__(self, iterator: Iterable[str], headers_set: bool, chunks: List[int]) -> None: ...
chunks: list[int]
def __init__(self, iterator: Iterable[str], headers_set: bool, chunks: list[int]) -> None: ...
def __iter__(self) -> GuardedIterator: ...
if sys.version_info >= (3, 0):
def __next__(self) -> str: ...
@@ -55,7 +55,7 @@ class LintMiddleware(object):
def __init__(self, app: WSGIApplication) -> None: ...
def check_environ(self, environ: WSGIEnvironment) -> None: ...
def check_start_response(
self, status: str, headers: List[Tuple[str, str]], exc_info: Tuple[Any, ...] | None
self, status: str, headers: list[Tuple[str, str]], exc_info: Tuple[Any, ...] | None
) -> Tuple[int, Headers]: ...
def check_headers(self, headers: Mapping[str, str]) -> None: ...
def check_iterator(self, app_iter: Iterable[bytes]) -> None: ...

View File

@@ -1,5 +1,5 @@
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
from typing import IO, Iterable, List, Text, Tuple
from typing import IO, Iterable, Text, Tuple
class ProfilerMiddleware(object):
def __init__(
@@ -11,4 +11,4 @@ class ProfilerMiddleware(object):
profile_dir: Text | None = ...,
filename_format: Text = ...,
) -> None: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> List[bytes]: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> list[bytes]: ...

View File

@@ -1,6 +1,6 @@
import datetime
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
from typing import IO, Callable, Iterable, List, Mapping, Optional, Text, Tuple, Union
from typing import IO, Callable, Iterable, Mapping, Optional, Text, Tuple, Union
_V = Union[Tuple[Text, Text], Text]
@@ -9,7 +9,7 @@ _Loader = Callable[[Optional[Text]], Union[Tuple[None, None], Tuple[Text, _Opene
class SharedDataMiddleware(object):
app: WSGIApplication
exports: List[Tuple[Text, _Loader]]
exports: list[Tuple[Text, _Loader]]
cache: bool
cache_timeout: float
def __init__(

View File

@@ -1,6 +1,6 @@
from _typeshed import ReadableBuffer, StrOrBytesPath, WriteableBuffer
from io import FileIO
from typing import Iterable, List
from typing import Iterable
from ..base import AsyncBase
@@ -11,7 +11,7 @@ class _UnknownAsyncBinaryIO(AsyncBase[bytes]):
async def read(self, __size: int = ...) -> bytes: ...
async def readinto(self, __buffer: WriteableBuffer) -> int | None: ...
async def readline(self, __size: int | None = ...) -> bytes: ...
async def readlines(self, __hint: int = ...) -> List[bytes]: ...
async def readlines(self, __hint: int = ...) -> list[bytes]: ...
async def seek(self, __offset: int, __whence: int = ...) -> int: ...
async def seekable(self) -> bool: ...
async def tell(self) -> int: ...

View File

@@ -1,5 +1,5 @@
from _typeshed import StrOrBytesPath
from typing import BinaryIO, Iterable, List, Tuple
from typing import BinaryIO, Iterable, Tuple
from ..base import AsyncBase
@@ -9,7 +9,7 @@ class AsyncTextIOWrapper(AsyncBase[str]):
async def isatty(self) -> bool: ...
async def read(self, __size: int | None = ...) -> str: ...
async def readline(self, __size: int = ...) -> str: ...
async def readlines(self, __hint: int = ...) -> List[str]: ...
async def readlines(self, __hint: int = ...) -> list[str]: ...
async def seek(self, __offset: int, __whence: int = ...) -> int: ...
async def seekable(self) -> bool: ...
async def tell(self) -> int: ...

View File

@@ -1,5 +1,5 @@
from _typeshed import Self, SupportsRead
from typing import Any, List, Sequence, Type
from typing import Any, Sequence, Type
from .builder import TreeBuilder
from .element import PageElement, SoupStrainer, Tag
@@ -10,7 +10,7 @@ class MarkupResemblesLocatorWarning(UserWarning): ...
class BeautifulSoup(Tag):
ROOT_TAG_NAME: str
DEFAULT_BUILDER_FEATURES: List[str]
DEFAULT_BUILDER_FEATURES: list[str]
ASCII_SPACES: str
NO_PARSER_SPECIFIED_WARNING: str
element_classes: Any

View File

@@ -1,4 +1,4 @@
from typing import Any, Generator, Iterable, List, Text
from typing import Any, Generator, Iterable, Text
class HTMLParser(object): # actually html5lib.HTMLParser
def __getattr__(self, __name: Text) -> Any: ... # incomplete
@@ -13,7 +13,7 @@ class HTMLSerializer(object): # actually html5lib.serializer.HTMLSerializer
def __getattr__(self, __name: Text) -> Any: ... # incomplete
class BleachHTMLParser(HTMLParser):
tags: List[Text] | None
tags: list[Text] | None
strip: bool
consume_entities: bool
def __init__(self, tags: Iterable[Text] | None, strip: bool, consume_entities: bool, **kwargs) -> None: ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Container, Iterable, List, MutableMapping, Pattern, Protocol, Text
from typing import Any, Container, Iterable, MutableMapping, Pattern, Protocol, Text
from .html5lib_shim import Filter
@@ -7,9 +7,9 @@ _Attrs = MutableMapping[Any, Text]
class _Callback(Protocol):
def __call__(self, attrs: _Attrs, new: bool = ...) -> _Attrs: ...
DEFAULT_CALLBACKS: List[_Callback]
DEFAULT_CALLBACKS: list[_Callback]
TLDS: List[Text]
TLDS: list[Text]
def build_url_re(tlds: Iterable[Text] = ..., protocols: Iterable[Text] = ...) -> Pattern[Text]: ...

View File

@@ -2,10 +2,10 @@ from typing import Any, Callable, Container, Dict, Iterable, List, Pattern, Text
from .html5lib_shim import BleachHTMLParser, BleachHTMLSerializer, SanitizerFilter
ALLOWED_TAGS: List[Text]
ALLOWED_ATTRIBUTES: Dict[Text, List[Text]]
ALLOWED_STYLES: List[Text]
ALLOWED_PROTOCOLS: List[Text]
ALLOWED_TAGS: list[Text]
ALLOWED_ATTRIBUTES: dict[Text, list[Text]]
ALLOWED_STYLES: list[Text]
ALLOWED_PROTOCOLS: list[Text]
INVISIBLE_CHARACTERS: Text
INVISIBLE_CHARACTERS_RE: Pattern[Text]

View File

@@ -1,6 +1,4 @@
from typing import List
import boto.regioninfo
def regions() -> List[boto.regioninfo.RegionInfo]: ...
def regions() -> list[boto.regioninfo.RegionInfo]: ...
def connect_to_region(region_name, **kw_params): ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Dict, List, Mapping, Type
from typing import Any, Mapping, Type
from boto.connection import AWSQueryConnection
@@ -11,67 +11,67 @@ class KMSConnection(AWSQueryConnection):
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: ...
def create_alias(self, alias_name: str, target_key_id: str) -> dict[str, Any] | None: ...
def create_grant(
self,
key_id: str,
grantee_principal: str,
retiring_principal: str | None = ...,
operations: List[str] | None = ...,
constraints: Dict[str, Dict[str, str]] | None = ...,
grant_tokens: List[str] | None = ...,
) -> Dict[str, Any] | None: ...
operations: list[str] | None = ...,
constraints: dict[str, dict[str, str]] | None = ...,
grant_tokens: list[str] | None = ...,
) -> dict[str, Any] | None: ...
def create_key(
self, policy: str | None = ..., description: str | None = ..., key_usage: str | None = ...
) -> Dict[str, Any] | None: ...
) -> dict[str, Any] | None: ...
def decrypt(
self, ciphertext_blob: bytes, encryption_context: Mapping[str, Any] | None = ..., grant_tokens: List[str] | None = ...
) -> Dict[str, Any] | None: ...
def delete_alias(self, alias_name: str) -> Dict[str, Any] | None: ...
def describe_key(self, key_id: str) -> Dict[str, Any] | None: ...
def disable_key(self, key_id: str) -> Dict[str, Any] | None: ...
def disable_key_rotation(self, key_id: str) -> Dict[str, Any] | None: ...
def enable_key(self, key_id: str) -> Dict[str, Any] | None: ...
def enable_key_rotation(self, key_id: str) -> Dict[str, Any] | None: ...
self, ciphertext_blob: bytes, encryption_context: Mapping[str, Any] | None = ..., grant_tokens: list[str] | None = ...
) -> dict[str, Any] | None: ...
def delete_alias(self, alias_name: str) -> dict[str, Any] | None: ...
def describe_key(self, key_id: str) -> dict[str, Any] | None: ...
def disable_key(self, key_id: str) -> dict[str, Any] | None: ...
def disable_key_rotation(self, key_id: str) -> dict[str, Any] | None: ...
def enable_key(self, key_id: str) -> dict[str, Any] | None: ...
def enable_key_rotation(self, key_id: str) -> dict[str, Any] | None: ...
def encrypt(
self,
key_id: str,
plaintext: bytes,
encryption_context: Mapping[str, Any] | None = ...,
grant_tokens: List[str] | None = ...,
) -> Dict[str, Any] | None: ...
grant_tokens: list[str] | None = ...,
) -> dict[str, Any] | None: ...
def generate_data_key(
self,
key_id: str,
encryption_context: Mapping[str, Any] | None = ...,
number_of_bytes: int | None = ...,
key_spec: str | None = ...,
grant_tokens: List[str] | None = ...,
) -> Dict[str, Any] | None: ...
grant_tokens: list[str] | None = ...,
) -> dict[str, Any] | None: ...
def generate_data_key_without_plaintext(
self,
key_id: str,
encryption_context: Mapping[str, Any] | None = ...,
key_spec: str | None = ...,
number_of_bytes: int | None = ...,
grant_tokens: List[str] | None = ...,
) -> Dict[str, Any] | None: ...
def generate_random(self, number_of_bytes: int | None = ...) -> Dict[str, Any] | None: ...
def get_key_policy(self, key_id: str, policy_name: str) -> Dict[str, Any] | None: ...
def get_key_rotation_status(self, key_id: str) -> Dict[str, Any] | None: ...
def list_aliases(self, limit: int | None = ..., marker: str | None = ...) -> Dict[str, Any] | None: ...
def list_grants(self, key_id: str, limit: int | None = ..., marker: str | None = ...) -> Dict[str, Any] | None: ...
def list_key_policies(self, key_id: str, limit: int | None = ..., marker: str | None = ...) -> Dict[str, Any] | None: ...
def list_keys(self, limit: int | None = ..., marker: str | None = ...) -> Dict[str, Any] | None: ...
def put_key_policy(self, key_id: str, policy_name: str, policy: str) -> Dict[str, Any] | None: ...
grant_tokens: list[str] | None = ...,
) -> dict[str, Any] | None: ...
def generate_random(self, number_of_bytes: int | None = ...) -> dict[str, Any] | None: ...
def get_key_policy(self, key_id: str, policy_name: str) -> dict[str, Any] | None: ...
def get_key_rotation_status(self, key_id: str) -> dict[str, Any] | None: ...
def list_aliases(self, limit: int | None = ..., marker: str | None = ...) -> dict[str, Any] | None: ...
def list_grants(self, key_id: str, limit: int | None = ..., marker: str | None = ...) -> dict[str, Any] | None: ...
def list_key_policies(self, key_id: str, limit: int | None = ..., marker: str | None = ...) -> dict[str, Any] | None: ...
def list_keys(self, limit: int | None = ..., marker: str | None = ...) -> dict[str, Any] | None: ...
def put_key_policy(self, key_id: str, policy_name: str, policy: str) -> dict[str, Any] | None: ...
def re_encrypt(
self,
ciphertext_blob: bytes,
destination_key_id: str,
source_encryption_context: Mapping[str, Any] | None = ...,
destination_encryption_context: Mapping[str, Any] | None = ...,
grant_tokens: List[str] | None = ...,
) -> Dict[str, Any] | None: ...
def retire_grant(self, grant_token: str) -> Dict[str, Any] | None: ...
def revoke_grant(self, key_id: str, grant_id: str) -> Dict[str, Any] | None: ...
def update_key_description(self, key_id: str, description: str) -> Dict[str, Any] | None: ...
grant_tokens: list[str] | None = ...,
) -> dict[str, Any] | None: ...
def retire_grant(self, grant_token: str) -> dict[str, Any] | None: ...
def revoke_grant(self, key_id: str, grant_id: str) -> dict[str, Any] | None: ...
def update_key_description(self, key_id: str, description: str) -> dict[str, Any] | None: ...

View File

@@ -1,4 +1,4 @@
from typing import List, Text, Type
from typing import Text, Type
from boto.connection import AWSAuthConnection
from boto.regioninfo import RegionInfo
@@ -14,5 +14,5 @@ class S3RegionInfo(RegionInfo):
**kw_params,
) -> S3Connection: ...
def regions() -> List[S3RegionInfo]: ...
def regions() -> list[S3RegionInfo]: ...
def connect_to_region(region_name: Text, **kw_params): ...

View File

@@ -1,9 +1,9 @@
from typing import Any, Dict, List, Text
from typing import Any, Text
from .connection import S3Connection
from .user import User
CannedACLStrings: List[str]
CannedACLStrings: list[str]
class Policy:
parent: Any
@@ -11,13 +11,13 @@ class Policy:
acl: ACL
def __init__(self, parent: Any | None = ...) -> None: ...
owner: User
def startElement(self, name: Text, attrs: Dict[str, Any], connection: S3Connection) -> None | User | ACL: ...
def startElement(self, name: Text, attrs: dict[str, Any], connection: S3Connection) -> None | User | ACL: ...
def endElement(self, name: Text, value: Any, connection: S3Connection) -> None: ...
def to_xml(self) -> str: ...
class ACL:
policy: Policy
grants: List[Grant]
grants: list[Grant]
def __init__(self, policy: Policy | None = ...) -> None: ...
def add_grant(self, grant: Grant) -> None: ...
def add_email_grant(self, permission: Text, email_address: Text) -> None: ...

View File

@@ -1,15 +1,15 @@
from typing import Any, Dict, List, Text, Type
from typing import Any, Text, Type
from .bucketlistresultset import BucketListResultSet
from .connection import S3Connection
from .key import Key
class S3WebsiteEndpointTranslate:
trans_region: Dict[str, str]
trans_region: dict[str, str]
@classmethod
def translate_region(cls, reg: Text) -> str: ...
S3Permissions: List[str]
S3Permissions: list[str]
class Bucket:
LoggingGroup: str
@@ -27,13 +27,13 @@ class Bucket:
creation_date: Any
def endElement(self, name, value, connection): ...
def set_key_class(self, key_class): ...
def lookup(self, key_name, headers: Dict[Text, Text] | None = ...): ...
def lookup(self, key_name, headers: dict[Text, Text] | None = ...): ...
def get_key(
self,
key_name,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
version_id: Any | None = ...,
response_headers: Dict[Text, Text] | None = ...,
response_headers: dict[Text, Text] | None = ...,
validate: bool = ...,
) -> Key: ...
def list(
@@ -41,7 +41,7 @@ class Bucket:
prefix: Text = ...,
delimiter: Text = ...,
marker: Text = ...,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
encoding_type: Any | None = ...,
) -> BucketListResultSet: ...
def list_versions(
@@ -50,34 +50,34 @@ class Bucket:
delimiter: str = ...,
key_marker: str = ...,
version_id_marker: str = ...,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
encoding_type: Text | None = ...,
) -> BucketListResultSet: ...
def list_multipart_uploads(
self,
key_marker: str = ...,
upload_id_marker: str = ...,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
encoding_type: Any | None = ...,
): ...
def validate_kwarg_names(self, kwargs, names): ...
def get_all_keys(self, headers: Dict[Text, Text] | None = ..., **params): ...
def get_all_versions(self, headers: Dict[Text, Text] | None = ..., **params): ...
def get_all_keys(self, headers: dict[Text, Text] | None = ..., **params): ...
def get_all_versions(self, headers: dict[Text, Text] | None = ..., **params): ...
def validate_get_all_versions_params(self, params): ...
def get_all_multipart_uploads(self, headers: Dict[Text, Text] | None = ..., **params): ...
def get_all_multipart_uploads(self, headers: dict[Text, Text] | None = ..., **params): ...
def new_key(self, key_name: Any | None = ...): ...
def generate_url(
self,
expires_in,
method: str = ...,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
force_http: bool = ...,
response_headers: Dict[Text, Text] | None = ...,
response_headers: dict[Text, Text] | None = ...,
expires_in_absolute: bool = ...,
): ...
def delete_keys(self, keys, quiet: bool = ..., mfa_token: Any | None = ..., headers: Dict[Text, Text] | None = ...): ...
def delete_keys(self, keys, quiet: bool = ..., mfa_token: Any | None = ..., headers: dict[Text, Text] | None = ...): ...
def delete_key(
self, key_name, headers: Dict[Text, Text] | None = ..., version_id: Any | None = ..., mfa_token: Any | None = ...
self, key_name, headers: dict[Text, Text] | None = ..., version_id: Any | None = ..., mfa_token: Any | None = ...
): ...
def copy_key(
self,
@@ -89,90 +89,90 @@ class Bucket:
storage_class: str = ...,
preserve_acl: bool = ...,
encrypt_key: bool = ...,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
query_args: Any | None = ...,
): ...
def set_canned_acl(
self, acl_str, key_name: str = ..., headers: Dict[Text, Text] | None = ..., version_id: Any | None = ...
self, acl_str, key_name: str = ..., headers: dict[Text, Text] | None = ..., version_id: Any | None = ...
): ...
def get_xml_acl(self, key_name: str = ..., headers: Dict[Text, Text] | None = ..., version_id: Any | None = ...): ...
def get_xml_acl(self, key_name: str = ..., headers: dict[Text, Text] | None = ..., version_id: Any | None = ...): ...
def set_xml_acl(
self,
acl_str,
key_name: str = ...,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
version_id: Any | None = ...,
query_args: str = ...,
): ...
def set_acl(self, acl_or_str, key_name: str = ..., headers: Dict[Text, Text] | None = ..., version_id: Any | None = ...): ...
def get_acl(self, key_name: str = ..., headers: Dict[Text, Text] | None = ..., version_id: Any | None = ...): ...
def set_acl(self, acl_or_str, key_name: str = ..., headers: dict[Text, Text] | None = ..., version_id: Any | None = ...): ...
def get_acl(self, key_name: str = ..., headers: dict[Text, Text] | None = ..., version_id: Any | None = ...): ...
def set_subresource(
self, subresource, value, key_name: str = ..., headers: Dict[Text, Text] | None = ..., version_id: Any | None = ...
self, subresource, value, key_name: str = ..., headers: dict[Text, Text] | None = ..., version_id: Any | None = ...
): ...
def get_subresource(
self, subresource, key_name: str = ..., headers: Dict[Text, Text] | None = ..., version_id: Any | None = ...
self, subresource, key_name: str = ..., headers: dict[Text, Text] | None = ..., version_id: Any | None = ...
): ...
def make_public(self, recursive: bool = ..., headers: Dict[Text, Text] | None = ...): ...
def add_email_grant(self, permission, email_address, recursive: bool = ..., headers: Dict[Text, Text] | None = ...): ...
def make_public(self, recursive: bool = ..., headers: dict[Text, Text] | None = ...): ...
def add_email_grant(self, permission, email_address, recursive: bool = ..., headers: dict[Text, Text] | None = ...): ...
def add_user_grant(
self, permission, user_id, recursive: bool = ..., headers: Dict[Text, Text] | None = ..., display_name: Any | None = ...
self, permission, user_id, recursive: bool = ..., headers: dict[Text, Text] | None = ..., display_name: Any | None = ...
): ...
def list_grants(self, headers: Dict[Text, Text] | None = ...): ...
def list_grants(self, headers: dict[Text, Text] | None = ...): ...
def get_location(self): ...
def set_xml_logging(self, logging_str, headers: Dict[Text, Text] | None = ...): ...
def set_xml_logging(self, logging_str, headers: dict[Text, Text] | None = ...): ...
def enable_logging(
self, target_bucket, target_prefix: str = ..., grants: Any | None = ..., headers: Dict[Text, Text] | None = ...
self, target_bucket, target_prefix: str = ..., grants: Any | None = ..., headers: dict[Text, Text] | None = ...
): ...
def disable_logging(self, headers: Dict[Text, Text] | None = ...): ...
def get_logging_status(self, headers: Dict[Text, Text] | None = ...): ...
def set_as_logging_target(self, headers: Dict[Text, Text] | None = ...): ...
def get_request_payment(self, headers: Dict[Text, Text] | None = ...): ...
def set_request_payment(self, payer: str = ..., headers: Dict[Text, Text] | None = ...): ...
def disable_logging(self, headers: dict[Text, Text] | None = ...): ...
def get_logging_status(self, headers: dict[Text, Text] | None = ...): ...
def set_as_logging_target(self, headers: dict[Text, Text] | None = ...): ...
def get_request_payment(self, headers: dict[Text, Text] | None = ...): ...
def set_request_payment(self, payer: str = ..., headers: dict[Text, Text] | None = ...): ...
def configure_versioning(
self, versioning, mfa_delete: bool = ..., mfa_token: Any | None = ..., headers: Dict[Text, Text] | None = ...
self, versioning, mfa_delete: bool = ..., mfa_token: Any | None = ..., headers: dict[Text, Text] | None = ...
): ...
def get_versioning_status(self, headers: Dict[Text, Text] | None = ...): ...
def configure_lifecycle(self, lifecycle_config, headers: Dict[Text, Text] | None = ...): ...
def get_lifecycle_config(self, headers: Dict[Text, Text] | None = ...): ...
def delete_lifecycle_configuration(self, headers: Dict[Text, Text] | None = ...): ...
def get_versioning_status(self, headers: dict[Text, Text] | None = ...): ...
def configure_lifecycle(self, lifecycle_config, headers: dict[Text, Text] | None = ...): ...
def get_lifecycle_config(self, headers: dict[Text, Text] | None = ...): ...
def delete_lifecycle_configuration(self, headers: dict[Text, Text] | None = ...): ...
def configure_website(
self,
suffix: Any | None = ...,
error_key: Any | None = ...,
redirect_all_requests_to: Any | None = ...,
routing_rules: Any | None = ...,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
): ...
def set_website_configuration(self, config, headers: Dict[Text, Text] | None = ...): ...
def set_website_configuration_xml(self, xml, headers: Dict[Text, Text] | None = ...): ...
def get_website_configuration(self, headers: Dict[Text, Text] | None = ...): ...
def get_website_configuration_obj(self, headers: Dict[Text, Text] | None = ...): ...
def get_website_configuration_with_xml(self, headers: Dict[Text, Text] | None = ...): ...
def get_website_configuration_xml(self, headers: Dict[Text, Text] | None = ...): ...
def delete_website_configuration(self, headers: Dict[Text, Text] | None = ...): ...
def set_website_configuration(self, config, headers: dict[Text, Text] | None = ...): ...
def set_website_configuration_xml(self, xml, headers: dict[Text, Text] | None = ...): ...
def get_website_configuration(self, headers: dict[Text, Text] | None = ...): ...
def get_website_configuration_obj(self, headers: dict[Text, Text] | None = ...): ...
def get_website_configuration_with_xml(self, headers: dict[Text, Text] | None = ...): ...
def get_website_configuration_xml(self, headers: dict[Text, Text] | None = ...): ...
def delete_website_configuration(self, headers: dict[Text, Text] | None = ...): ...
def get_website_endpoint(self): ...
def get_policy(self, headers: Dict[Text, Text] | None = ...): ...
def set_policy(self, policy, headers: Dict[Text, Text] | None = ...): ...
def delete_policy(self, headers: Dict[Text, Text] | None = ...): ...
def set_cors_xml(self, cors_xml, headers: Dict[Text, Text] | None = ...): ...
def set_cors(self, cors_config, headers: Dict[Text, Text] | None = ...): ...
def get_cors_xml(self, headers: Dict[Text, Text] | None = ...): ...
def get_cors(self, headers: Dict[Text, Text] | None = ...): ...
def delete_cors(self, headers: Dict[Text, Text] | None = ...): ...
def get_policy(self, headers: dict[Text, Text] | None = ...): ...
def set_policy(self, policy, headers: dict[Text, Text] | None = ...): ...
def delete_policy(self, headers: dict[Text, Text] | None = ...): ...
def set_cors_xml(self, cors_xml, headers: dict[Text, Text] | None = ...): ...
def set_cors(self, cors_config, headers: dict[Text, Text] | None = ...): ...
def get_cors_xml(self, headers: dict[Text, Text] | None = ...): ...
def get_cors(self, headers: dict[Text, Text] | None = ...): ...
def delete_cors(self, headers: dict[Text, Text] | None = ...): ...
def initiate_multipart_upload(
self,
key_name,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
reduced_redundancy: bool = ...,
metadata: Any | None = ...,
encrypt_key: bool = ...,
policy: Any | None = ...,
): ...
def complete_multipart_upload(self, key_name, upload_id, xml_body, headers: Dict[Text, Text] | None = ...): ...
def cancel_multipart_upload(self, key_name, upload_id, headers: Dict[Text, Text] | None = ...): ...
def delete(self, headers: Dict[Text, Text] | None = ...): ...
def complete_multipart_upload(self, key_name, upload_id, xml_body, headers: dict[Text, Text] | None = ...): ...
def cancel_multipart_upload(self, key_name, upload_id, headers: dict[Text, Text] | None = ...): ...
def delete(self, headers: dict[Text, Text] | None = ...): ...
def get_tags(self): ...
def get_xml_tags(self): ...
def set_xml_tags(self, tag_str, headers: Dict[Text, Text] | None = ..., query_args: str = ...): ...
def set_tags(self, tags, headers: Dict[Text, Text] | None = ...): ...
def delete_tags(self, headers: Dict[Text, Text] | None = ...): ...
def set_xml_tags(self, tag_str, headers: dict[Text, Text] | None = ..., query_args: str = ...): ...
def set_tags(self, tags, headers: dict[Text, Text] | None = ...): ...
def delete_tags(self, headers: dict[Text, Text] | None = ...): ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Dict, Text, Type
from typing import Any, Text, Type
from boto.connection import AWSAuthConnection
from boto.exception import BotoClientError
@@ -97,9 +97,9 @@ class S3Connection(AWSAuthConnection):
method,
bucket: str = ...,
key: str = ...,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
force_http: bool = ...,
response_headers: Dict[Text, Text] | None = ...,
response_headers: dict[Text, Text] | None = ...,
version_id: Any | None = ...,
iso_date: Any | None = ...,
): ...
@@ -109,20 +109,20 @@ class S3Connection(AWSAuthConnection):
method,
bucket: str = ...,
key: str = ...,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
query_auth: bool = ...,
force_http: bool = ...,
response_headers: Dict[Text, Text] | None = ...,
response_headers: dict[Text, Text] | None = ...,
expires_in_absolute: bool = ...,
version_id: Any | None = ...,
): ...
def get_all_buckets(self, headers: Dict[Text, Text] | None = ...): ...
def get_canonical_user_id(self, headers: Dict[Text, Text] | None = ...): ...
def get_bucket(self, bucket_name: Text, validate: bool = ..., headers: Dict[Text, Text] | None = ...) -> Bucket: ...
def head_bucket(self, bucket_name, headers: Dict[Text, Text] | None = ...): ...
def lookup(self, bucket_name, validate: bool = ..., headers: Dict[Text, Text] | None = ...): ...
def get_all_buckets(self, headers: dict[Text, Text] | None = ...): ...
def get_canonical_user_id(self, headers: dict[Text, Text] | None = ...): ...
def get_bucket(self, bucket_name: Text, validate: bool = ..., headers: dict[Text, Text] | None = ...) -> Bucket: ...
def head_bucket(self, bucket_name, headers: dict[Text, Text] | None = ...): ...
def lookup(self, bucket_name, validate: bool = ..., headers: dict[Text, Text] | None = ...): ...
def create_bucket(
self, bucket_name, headers: Dict[Text, Text] | None = ..., location: Any = ..., policy: Any | None = ...
self, bucket_name, headers: dict[Text, Text] | None = ..., location: Any = ..., policy: Any | None = ...
): ...
def delete_bucket(self, bucket, headers: Dict[Text, Text] | None = ...): ...
def delete_bucket(self, bucket, headers: dict[Text, Text] | None = ...): ...
def make_request(self, method, bucket: str = ..., key: str = ..., headers: Any | None = ..., data: str = ..., query_args: Any | None = ..., sender: Any | None = ..., override_num_retries: Any | None = ..., retry_handler: Any | None = ..., *args, **kwargs): ... # type: ignore # https://github.com/python/mypy/issues/1237

View File

@@ -1,4 +1,4 @@
from typing import Any, Callable, Dict, Text, overload
from typing import Any, Callable, Text, overload
class Key:
DefaultContentType: str
@@ -45,16 +45,16 @@ class Key:
def handle_addl_headers(self, headers): ...
def open_read(
self,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
query_args: str = ...,
override_num_retries: Any | None = ...,
response_headers: Dict[Text, Text] | None = ...,
response_headers: dict[Text, Text] | None = ...,
): ...
def open_write(self, headers: Dict[Text, Text] | None = ..., override_num_retries: Any | None = ...): ...
def open_write(self, headers: dict[Text, Text] | None = ..., override_num_retries: Any | None = ...): ...
def open(
self,
mode: str = ...,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
query_args: Any | None = ...,
override_num_retries: Any | None = ...,
): ...
@@ -76,27 +76,27 @@ class Key:
): ...
def startElement(self, name, attrs, connection): ...
def endElement(self, name, value, connection): ...
def exists(self, headers: Dict[Text, Text] | None = ...): ...
def delete(self, headers: Dict[Text, Text] | None = ...): ...
def exists(self, headers: dict[Text, Text] | None = ...): ...
def delete(self, headers: dict[Text, Text] | None = ...): ...
def get_metadata(self, name): ...
def set_metadata(self, name, value): ...
def update_metadata(self, d): ...
def set_acl(self, acl_str, headers: Dict[Text, Text] | None = ...): ...
def get_acl(self, headers: Dict[Text, Text] | None = ...): ...
def get_xml_acl(self, headers: Dict[Text, Text] | None = ...): ...
def set_xml_acl(self, acl_str, headers: Dict[Text, Text] | None = ...): ...
def set_canned_acl(self, acl_str, headers: Dict[Text, Text] | None = ...): ...
def set_acl(self, acl_str, headers: dict[Text, Text] | None = ...): ...
def get_acl(self, headers: dict[Text, Text] | None = ...): ...
def get_xml_acl(self, headers: dict[Text, Text] | None = ...): ...
def set_xml_acl(self, acl_str, headers: dict[Text, Text] | None = ...): ...
def set_canned_acl(self, acl_str, headers: dict[Text, Text] | None = ...): ...
def get_redirect(self): ...
def set_redirect(self, redirect_location, headers: Dict[Text, Text] | None = ...): ...
def make_public(self, headers: Dict[Text, Text] | None = ...): ...
def set_redirect(self, redirect_location, headers: dict[Text, Text] | None = ...): ...
def make_public(self, headers: dict[Text, Text] | None = ...): ...
def generate_url(
self,
expires_in,
method: str = ...,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
query_auth: bool = ...,
force_http: bool = ...,
response_headers: Dict[Text, Text] | None = ...,
response_headers: dict[Text, Text] | None = ...,
expires_in_absolute: bool = ...,
version_id: Any | None = ...,
policy: Any | None = ...,
@@ -106,7 +106,7 @@ class Key:
def send_file(
self,
fp,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
cb: Callable[[int, int], Any] | None = ...,
num_cb: int = ...,
query_args: Any | None = ...,
@@ -118,7 +118,7 @@ class Key:
def set_contents_from_stream(
self,
fp,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
replace: bool = ...,
cb: Callable[[int, int], Any] | None = ...,
num_cb: int = ...,
@@ -130,7 +130,7 @@ class Key:
def set_contents_from_file(
self,
fp,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
replace: bool = ...,
cb: Callable[[int, int], Any] | None = ...,
num_cb: int = ...,
@@ -145,7 +145,7 @@ class Key:
def set_contents_from_filename(
self,
filename,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
replace: bool = ...,
cb: Callable[[int, int], Any] | None = ...,
num_cb: int = ...,
@@ -157,7 +157,7 @@ class Key:
def set_contents_from_string(
self,
string_data: Text | bytes,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
replace: bool = ...,
cb: Callable[[int, int], Any] | None = ...,
num_cb: int = ...,
@@ -169,63 +169,63 @@ class Key:
def get_file(
self,
fp,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
cb: Callable[[int, int], Any] | None = ...,
num_cb: int = ...,
torrent: bool = ...,
version_id: Any | None = ...,
override_num_retries: Any | None = ...,
response_headers: Dict[Text, Text] | None = ...,
response_headers: dict[Text, Text] | None = ...,
): ...
def get_torrent_file(
self, fp, headers: Dict[Text, Text] | None = ..., cb: Callable[[int, int], Any] | None = ..., num_cb: int = ...
self, fp, headers: dict[Text, Text] | None = ..., cb: Callable[[int, int], Any] | None = ..., num_cb: int = ...
): ...
def get_contents_to_file(
self,
fp,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
cb: Callable[[int, int], Any] | None = ...,
num_cb: int = ...,
torrent: bool = ...,
version_id: Any | None = ...,
res_download_handler: Any | None = ...,
response_headers: Dict[Text, Text] | None = ...,
response_headers: dict[Text, Text] | None = ...,
): ...
def get_contents_to_filename(
self,
filename,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
cb: Callable[[int, int], Any] | None = ...,
num_cb: int = ...,
torrent: bool = ...,
version_id: Any | None = ...,
res_download_handler: Any | None = ...,
response_headers: Dict[Text, Text] | None = ...,
response_headers: dict[Text, Text] | None = ...,
): ...
@overload
def get_contents_as_string(
self,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
cb: Callable[[int, int], Any] | None = ...,
num_cb: int = ...,
torrent: bool = ...,
version_id: Any | None = ...,
response_headers: Dict[Text, Text] | None = ...,
response_headers: dict[Text, Text] | None = ...,
encoding: None = ...,
) -> bytes: ...
@overload
def get_contents_as_string(
self,
headers: Dict[Text, Text] | None = ...,
headers: dict[Text, Text] | None = ...,
cb: Callable[[int, int], Any] | None = ...,
num_cb: int = ...,
torrent: bool = ...,
version_id: Any | None = ...,
response_headers: Dict[Text, Text] | None = ...,
response_headers: dict[Text, Text] | None = ...,
*,
encoding: Text,
) -> Text: ...
def add_email_grant(self, permission, email_address, headers: Dict[Text, Text] | None = ...): ...
def add_user_grant(self, permission, user_id, headers: Dict[Text, Text] | None = ..., display_name: Any | None = ...): ...
def set_remote_metadata(self, metadata_plus, metadata_minus, preserve_acl, headers: Dict[Text, Text] | None = ...): ...
def restore(self, days, headers: Dict[Text, Text] | None = ...): ...
def add_email_grant(self, permission, email_address, headers: dict[Text, Text] | None = ...): ...
def add_user_grant(self, permission, user_id, headers: dict[Text, Text] | None = ..., display_name: Any | None = ...): ...
def set_remote_metadata(self, metadata_plus, metadata_minus, preserve_acl, headers: dict[Text, Text] | None = ...): ...
def restore(self, days, headers: dict[Text, Text] | None = ...): ...

View File

@@ -3,7 +3,7 @@ import logging.handlers
import subprocess
import sys
import time
from typing import IO, Any, Callable, ContextManager, Dict, Iterable, List, Mapping, Sequence, Tuple, Type, TypeVar
from typing import IO, Any, Callable, ContextManager, Dict, Iterable, Mapping, Sequence, Tuple, Type, TypeVar
import boto.connection
@@ -38,7 +38,7 @@ _Provider = Any # TODO replace this with boto.provider.Provider once stubs exis
_LockType = Any # TODO replace this with _thread.LockType once stubs exist
JSONDecodeError: Type[ValueError]
qsa_of_interest: List[str]
qsa_of_interest: list[str]
def unquote_v(nv: str) -> str | Tuple[str, str]: ...
def canonical_string(
@@ -108,7 +108,7 @@ class LRUCache(Dict[_KT, _VT]):
key = ...
value = ...
def __init__(self, key, value) -> None: ...
_dict: Dict[_KT, LRUCache._Item]
_dict: dict[_KT, LRUCache._Item]
capacity: int
head: LRUCache._Item | None
tail: LRUCache._Item | None
@@ -134,15 +134,15 @@ def notify(
append_instance_id: bool = ...,
) -> None: ...
def get_utf8_value(value: str) -> bytes: ...
def mklist(value: Any) -> List[Any]: ...
def mklist(value: Any) -> list[Any]: ...
def pythonize_name(name: str) -> str: ...
def write_mime_multipart(
content: List[Tuple[str, str]], compress: bool = ..., deftype: str = ..., delimiter: str = ...
content: list[Tuple[str, str]], compress: bool = ..., deftype: str = ..., delimiter: str = ...
) -> str: ...
def guess_mime_type(content: str, deftype: str) -> str: ...
def compute_md5(fp: IO[Any], buf_size: int = ..., size: int | None = ...) -> Tuple[str, str, int]: ...
def compute_hash(fp: IO[Any], buf_size: int = ..., size: int | None = ..., hash_algorithm: Any = ...) -> Tuple[str, str, int]: ...
def find_matching_headers(name: str, headers: Mapping[str, str | None]) -> List[str]: ...
def find_matching_headers(name: str, headers: Mapping[str, str | None]) -> list[str]: ...
def merge_headers_by_name(name: str, headers: Mapping[str, str | None]) -> str: ...
class RequestHook:

View File

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

View File

@@ -1,5 +1,5 @@
from logging import Logger
from typing import Dict, Pattern
from typing import Pattern
from typing_extensions import TypedDict
class _FinalResultType(TypedDict):
@@ -17,7 +17,7 @@ class UniversalDetector(object):
HIGH_BYTE_DETECTOR: Pattern[bytes]
ESC_DETECTOR: Pattern[bytes]
WIN_BYTE_DETECTOR: Pattern[bytes]
ISO_WIN_MAP: Dict[str, str]
ISO_WIN_MAP: dict[str, str]
result: _IntermediateResultType
done: bool

View File

@@ -1,4 +1,2 @@
from typing import List
__version__: str
VERSION: List[str]
VERSION: list[str]

View File

@@ -1,19 +1,4 @@
from typing import (
Any,
Callable,
ContextManager,
Dict,
Iterable,
List,
Mapping,
NoReturn,
Optional,
Sequence,
Set,
Tuple,
TypeVar,
Union,
)
from typing import Any, Callable, ContextManager, Iterable, Mapping, NoReturn, Optional, Sequence, Set, Tuple, TypeVar, Union
from click.formatting import HelpFormatter
from click.parser import OptionParser
@@ -32,9 +17,9 @@ class Context:
parent: Context | None
command: Command
info_name: str | None
params: Dict[Any, Any]
args: List[str]
protected_args: List[str]
params: dict[Any, Any]
args: list[str]
protected_args: list[str]
obj: Any
default_map: Mapping[str, Any] | None
invoked_subcommand: str | None
@@ -43,13 +28,13 @@ class Context:
allow_extra_args: bool
allow_interspersed_args: bool
ignore_unknown_options: bool
help_option_names: List[str]
help_option_names: list[str]
token_normalize_func: Callable[[str], str] | None
resilient_parsing: bool
auto_envvar_prefix: str | None
color: bool | None
_meta: Dict[str, Any]
_close_callbacks: List[Any]
_meta: dict[str, Any]
_close_callbacks: list[Any]
_depth: int
def __init__(
self,
@@ -65,12 +50,12 @@ class Context:
allow_extra_args: bool | None = ...,
allow_interspersed_args: bool | None = ...,
ignore_unknown_options: bool | None = ...,
help_option_names: List[str] | None = ...,
help_option_names: list[str] | None = ...,
token_normalize_func: Callable[[str], str] | None = ...,
color: bool | None = ...,
) -> None: ...
@property
def meta(self) -> Dict[str, Any]: ...
def meta(self) -> dict[str, Any]: ...
@property
def command_path(self) -> str: ...
def scope(self, cleanup: bool = ...) -> ContextManager[Context]: ...
@@ -94,16 +79,16 @@ class BaseCommand:
allow_interspersed_args: bool
ignore_unknown_options: bool
name: str
context_settings: Dict[Any, Any]
def __init__(self, name: str, context_settings: Dict[Any, Any] | None = ...) -> None: ...
context_settings: dict[Any, Any]
def __init__(self, name: str, context_settings: dict[Any, Any] | None = ...) -> None: ...
def get_usage(self, ctx: Context) -> str: ...
def get_help(self, ctx: Context) -> str: ...
def make_context(self, info_name: str, args: List[str], parent: Context | None = ..., **extra: Any) -> Context: ...
def parse_args(self, ctx: Context, args: List[str]) -> List[str]: ...
def make_context(self, info_name: str, args: list[str], parent: Context | None = ..., **extra: Any) -> Context: ...
def parse_args(self, ctx: Context, args: list[str]) -> list[str]: ...
def invoke(self, ctx: Context) -> Any: ...
def main(
self,
args: List[str] | None = ...,
args: list[str] | None = ...,
prog_name: str | None = ...,
complete_var: str | None = ...,
standalone_mode: bool = ...,
@@ -113,7 +98,7 @@ class BaseCommand:
class Command(BaseCommand):
callback: Callable[..., Any] | None
params: List[Parameter]
params: list[Parameter]
help: str | None
epilog: str | None
short_help: str | None
@@ -125,9 +110,9 @@ class Command(BaseCommand):
def __init__(
self,
name: str,
context_settings: Dict[Any, Any] | None = ...,
context_settings: dict[Any, Any] | None = ...,
callback: Callable[..., Any] | None = ...,
params: List[Parameter] | None = ...,
params: list[Parameter] | None = ...,
help: str | None = ...,
epilog: str | None = ...,
short_help: str | None = ...,
@@ -137,9 +122,9 @@ class Command(BaseCommand):
hidden: bool = ...,
deprecated: bool = ...,
) -> None: ...
def get_params(self, ctx: Context) -> List[Parameter]: ...
def get_params(self, ctx: Context) -> list[Parameter]: ...
def format_usage(self, ctx: Context, formatter: HelpFormatter) -> None: ...
def collect_usage_pieces(self, ctx: Context) -> List[str]: ...
def collect_usage_pieces(self, ctx: Context) -> list[str]: ...
def get_help_option_names(self, ctx: Context) -> Set[str]: ...
def get_help_option(self, ctx: Context) -> Option | None: ...
def make_parser(self, ctx: Context) -> OptionParser: ...
@@ -170,20 +155,20 @@ class MultiCommand(Command):
) -> None: ...
def resultcallback(self, replace: bool = ...) -> Callable[[_F], _F]: ...
def format_commands(self, ctx: Context, formatter: HelpFormatter) -> None: ...
def resolve_command(self, ctx: Context, args: List[str]) -> Tuple[str, Command, List[str]]: ...
def resolve_command(self, ctx: Context, args: list[str]) -> Tuple[str, Command, list[str]]: ...
def get_command(self, ctx: Context, cmd_name: str) -> Command | None: ...
def list_commands(self, ctx: Context) -> Iterable[str]: ...
class Group(MultiCommand):
commands: Dict[str, Command]
def __init__(self, name: str | None = ..., commands: Dict[str, Command] | None = ..., **attrs: Any) -> None: ...
commands: dict[str, Command]
def __init__(self, name: str | None = ..., commands: dict[str, Command] | None = ..., **attrs: Any) -> None: ...
def add_command(self, cmd: Command, name: str | None = ...) -> None: ...
def command(self, *args: Any, **kwargs: Any) -> Callable[[Callable[..., Any]], Command]: ...
def group(self, *args: Any, **kwargs: Any) -> Callable[[Callable[..., Any]], Group]: ...
class CommandCollection(MultiCommand):
sources: List[MultiCommand]
def __init__(self, name: str | None = ..., sources: List[MultiCommand] | None = ..., **attrs: Any) -> None: ...
sources: list[MultiCommand]
def __init__(self, name: str | None = ..., sources: list[MultiCommand] | None = ..., **attrs: Any) -> None: ...
def add_source(self, multi_cmd: MultiCommand) -> None: ...
class _ParamType:
@@ -194,7 +179,7 @@ class _ParamType:
def get_metavar(self, param: Parameter) -> str: ...
def get_missing_message(self, param: Parameter) -> str: ...
def convert(self, value: str, param: Parameter | None, ctx: Context | None) -> Any: ...
def split_envvar_value(self, rv: str) -> List[str]: ...
def split_envvar_value(self, rv: str) -> list[str]: ...
def fail(self, message: str, param: Parameter | None = ..., ctx: Context | None = ...) -> NoReturn: ...
# This type is here to resolve https://github.com/python/mypy/issues/5275
@@ -205,8 +190,8 @@ _ConvertibleType = Union[
class Parameter:
param_type_name: str
name: str
opts: List[str]
secondary_opts: List[str]
opts: list[str]
secondary_opts: list[str]
type: _ParamType
required: bool
callback: Callable[[Context, Parameter, str], Any] | None
@@ -216,7 +201,7 @@ class Parameter:
default: Any
is_eager: bool
metavar: str | None
envvar: str | List[str] | None
envvar: str | list[str] | None
def __init__(
self,
param_decls: Iterable[str] | None = ...,
@@ -228,23 +213,23 @@ class Parameter:
metavar: str | None = ...,
expose_value: bool = ...,
is_eager: bool = ...,
envvar: str | List[str] | None = ...,
envvar: str | list[str] | None = ...,
) -> None: ...
@property
def human_readable_name(self) -> str: ...
def make_metavar(self) -> str: ...
def get_default(self, ctx: Context) -> Any: ...
def add_to_parser(self, parser: OptionParser, ctx: Context) -> None: ...
def consume_value(self, ctx: Context, opts: Dict[str, Any]) -> Any: ...
def consume_value(self, ctx: Context, opts: dict[str, Any]) -> Any: ...
def type_cast_value(self, ctx: Context, value: Any) -> Any: ...
def process_value(self, ctx: Context, value: Any) -> Any: ...
def value_is_missing(self, value: Any) -> bool: ...
def full_process_value(self, ctx: Context, value: Any) -> Any: ...
def resolve_envvar_value(self, ctx: Context) -> str: ...
def value_from_envvar(self, ctx: Context) -> str | List[str]: ...
def handle_parse_result(self, ctx: Context, opts: Dict[str, Any], args: List[str]) -> Tuple[Any, List[str]]: ...
def value_from_envvar(self, ctx: Context) -> str | list[str]: ...
def handle_parse_result(self, ctx: Context, opts: dict[str, Any], args: list[str]) -> Tuple[Any, list[str]]: ...
def get_help_record(self, ctx: Context) -> Tuple[str, str]: ...
def get_usage_pieces(self, ctx: Context) -> List[str]: ...
def get_usage_pieces(self, ctx: Context) -> list[str]: ...
def get_error_hint(self, ctx: Context) -> str: ...
class Option(Parameter):

View File

@@ -1,6 +1,6 @@
from _typeshed import IdentityFunction
from distutils.version import Version
from typing import Any, Callable, Dict, Iterable, List, Text, Tuple, Type, TypeVar, Union, overload
from typing import Any, Callable, Iterable, Text, Tuple, Type, TypeVar, Union, overload
from click.core import Argument, Command, Context, Group, Option, Parameter, _ConvertibleType
@@ -20,7 +20,7 @@ def command(
name: str | None = ...,
cls: Type[Command] | None = ...,
# Command
context_settings: Dict[Any, Any] | None = ...,
context_settings: dict[Any, Any] | None = ...,
help: str | None = ...,
epilog: str | None = ...,
short_help: str | None = ...,
@@ -37,7 +37,7 @@ def group(
name: str | None = ...,
cls: Type[Command] = ...,
# Group
commands: Dict[str, Command] | None = ...,
commands: dict[str, Command] | None = ...,
# MultiCommand
invoke_without_command: bool = ...,
no_args_is_help: bool | None = ...,
@@ -68,8 +68,8 @@ def argument(
metavar: str | None = ...,
expose_value: bool = ...,
is_eager: bool = ...,
envvar: str | List[str] | None = ...,
autocompletion: Callable[[Context, List[str], str], Iterable[str | Tuple[str, str]]] | None = ...,
envvar: str | list[str] | None = ...,
autocompletion: Callable[[Context, list[str], str], Iterable[str | Tuple[str, str]]] | None = ...,
) -> IdentityFunction: ...
@overload
def option(
@@ -96,7 +96,7 @@ def option(
metavar: str | None = ...,
expose_value: bool = ...,
is_eager: bool = ...,
envvar: str | List[str] | None = ...,
envvar: str | list[str] | None = ...,
# User-defined
**kwargs: Any,
) -> IdentityFunction: ...
@@ -125,7 +125,7 @@ def option(
metavar: str | None = ...,
expose_value: bool = ...,
is_eager: bool = ...,
envvar: str | List[str] | None = ...,
envvar: str | list[str] | None = ...,
# User-defined
**kwargs: Any,
) -> IdentityFunction: ...
@@ -154,7 +154,7 @@ def option(
metavar: str | None = ...,
expose_value: bool = ...,
is_eager: bool = ...,
envvar: str | List[str] | None = ...,
envvar: str | list[str] | None = ...,
# User-defined
**kwargs: Any,
) -> IdentityFunction: ...
@@ -183,7 +183,7 @@ def option(
metavar: str | None = ...,
expose_value: bool = ...,
is_eager: bool = ...,
envvar: str | List[str] | None = ...,
envvar: str | list[str] | None = ...,
# User-defined
**kwargs: Any,
) -> IdentityFunction: ...
@@ -210,7 +210,7 @@ def confirmation_option(
metavar: str | None = ...,
expose_value: bool = ...,
is_eager: bool = ...,
envvar: str | List[str] | None = ...,
envvar: str | list[str] | None = ...,
) -> IdentityFunction: ...
def password_option(
*param_decls: str,
@@ -235,7 +235,7 @@ def password_option(
metavar: str | None = ...,
expose_value: bool = ...,
is_eager: bool = ...,
envvar: str | List[str] | None = ...,
envvar: str | list[str] | None = ...,
) -> IdentityFunction: ...
def version_option(
version: str | Version | None = ...,
@@ -263,7 +263,7 @@ def version_option(
metavar: str | None = ...,
expose_value: bool = ...,
is_eager: bool = ...,
envvar: str | List[str] | None = ...,
envvar: str | list[str] | None = ...,
) -> IdentityFunction: ...
def help_option(
*param_decls: str,
@@ -288,5 +288,5 @@ def help_option(
metavar: str | None = ...,
expose_value: bool = ...,
is_eager: bool = ...,
envvar: str | List[str] | None = ...,
envvar: str | list[str] | None = ...,
) -> IdentityFunction: ...

View File

@@ -1,4 +1,4 @@
from typing import IO, Any, List
from typing import IO, Any
from click.core import Command, Context, Parameter
@@ -35,9 +35,9 @@ class MissingParameter(BadParameter):
class NoSuchOption(UsageError):
option_name: str
possibilities: List[str] | None
possibilities: list[str] | None
def __init__(
self, option_name: str, message: str | None = ..., possibilities: List[str] | None = ..., ctx: Context | None = ...
self, option_name: str, message: str | None = ..., possibilities: list[str] | None = ..., ctx: Context | None = ...
) -> None: ...
class BadOptionUsage(UsageError):

View File

@@ -1,4 +1,4 @@
from typing import ContextManager, Generator, Iterable, List, Tuple
from typing import ContextManager, Generator, Iterable, Tuple
FORCED_WIDTH: int | None
@@ -12,7 +12,7 @@ class HelpFormatter:
indent_increment: int
width: int | None
current_indent: int
buffer: List[str]
buffer: list[str]
def __init__(self, indent_increment: int = ..., width: int | None = ..., max_width: int | None = ...) -> None: ...
def write(self, string: str) -> None: ...
def indent(self) -> None: ...
@@ -26,4 +26,4 @@ class HelpFormatter:
def indentation(self) -> ContextManager[None]: ...
def getvalue(self) -> str: ...
def join_options(options: List[str]) -> Tuple[str, bool]: ...
def join_options(options: list[str]) -> Tuple[str, bool]: ...

View File

@@ -1,11 +1,11 @@
from typing import Any, Dict, Iterable, List, Set, Tuple
from typing import Any, Iterable, Set, Tuple
from click.core import Context
def _unpack_args(args: Iterable[str], nargs_spec: Iterable[int]) -> Tuple[Tuple[Tuple[str, ...] | None, ...], List[str]]: ...
def _unpack_args(args: Iterable[str], nargs_spec: Iterable[int]) -> Tuple[Tuple[Tuple[str, ...] | None, ...], list[str]]: ...
def split_opt(opt: str) -> Tuple[str, str]: ...
def normalize_opt(opt: str, ctx: Context) -> str: ...
def split_arg_string(string: str) -> List[str]: ...
def split_arg_string(string: str) -> list[str]: ...
class Option:
dest: str
@@ -14,8 +14,8 @@ class Option:
const: Any
obj: Any
prefixes: Set[str]
_short_opts: List[str]
_long_opts: List[str]
_short_opts: list[str]
_long_opts: list[str]
def __init__(
self,
opts: Iterable[str],
@@ -37,20 +37,20 @@ class Argument:
def process(self, value: Any, state: ParsingState) -> None: ...
class ParsingState:
opts: Dict[str, Any]
largs: List[str]
rargs: List[str]
order: List[Any]
def __init__(self, rargs: List[str]) -> None: ...
opts: dict[str, Any]
largs: list[str]
rargs: list[str]
order: list[Any]
def __init__(self, rargs: list[str]) -> None: ...
class OptionParser:
ctx: Context | None
allow_interspersed_args: bool
ignore_unknown_options: bool
_short_opt: Dict[str, Option]
_long_opt: Dict[str, Option]
_short_opt: dict[str, Option]
_long_opt: dict[str, Option]
_opt_prefixes: Set[str]
_args: List[Argument]
_args: list[Argument]
def __init__(self, ctx: Context | None = ...) -> None: ...
def add_option(
self,
@@ -62,4 +62,4 @@ class OptionParser:
obj: Any | None = ...,
) -> None: ...
def add_argument(self, dest: str, nargs: int = ..., obj: Any | None = ...) -> None: ...
def parse_args(self, args: List[str]) -> Tuple[Dict[str, Any], List[str], List[Any]]: ...
def parse_args(self, args: list[str]) -> Tuple[dict[str, Any], list[str], list[Any]]: ...

View File

@@ -1,5 +1,5 @@
import io
from typing import IO, Any, BinaryIO, ContextManager, Dict, Iterable, List, Mapping, Text, Tuple
from typing import IO, Any, BinaryIO, ContextManager, Iterable, Mapping, Text, Tuple
from typing_extensions import Literal
from .core import BaseCommand
@@ -11,7 +11,7 @@ class EchoingStdin:
def __getattr__(self, x: str) -> Any: ...
def read(self, n: int = ...) -> bytes: ...
def readline(self, n: int = ...) -> bytes: ...
def readlines(self) -> List[bytes]: ...
def readlines(self) -> list[bytes]: ...
def __iter__(self) -> Iterable[bytes]: ...
def make_input_stream(input: bytes | Text | IO[Any] | None, charset: Text) -> BinaryIO: ...
@@ -48,7 +48,7 @@ class CliRunner:
self, charset: Text | None = ..., env: Mapping[str, str] | None = ..., echo_stdin: bool = ..., mix_stderr: bool = ...
) -> None: ...
def get_default_prog_name(self, cli: BaseCommand) -> str: ...
def make_env(self, overrides: Mapping[str, str] | None = ...) -> Dict[str, str]: ...
def make_env(self, overrides: Mapping[str, str] | None = ...) -> dict[str, str]: ...
def isolation(
self, input: bytes | Text | IO[Any] | None = ..., env: Mapping[str, str] | None = ..., color: bool = ...
) -> ContextManager[Tuple[io.BytesIO, io.BytesIO | Literal[False]]]: ...

View File

@@ -1,6 +1,6 @@
import datetime
import uuid
from typing import IO, Any, Callable, Generic, Iterable, List, Optional, Sequence, Text, Tuple as _PyTuple, Type, TypeVar, Union
from typing import IO, Any, Callable, Generic, Iterable, Optional, Sequence, Text, Tuple as _PyTuple, Type, TypeVar, Union
from click.core import Context, Parameter, _ConvertibleType, _ParamType
@@ -102,7 +102,7 @@ class StringParamType(ParamType):
def convert(self, value: str, param: Parameter | None, ctx: Context | None) -> str: ...
class Tuple(CompositeParamType):
types: List[ParamType]
types: list[ParamType]
def __init__(self, types: Iterable[Any]) -> None: ...
def __call__(self, value: str | None, param: Parameter | None = ..., ctx: Context | None = ...) -> Tuple: ...
def convert(self, value: str, param: Parameter | None, ctx: Context | None) -> Tuple: ...

View File

@@ -1,5 +1,5 @@
from types import TracebackType
from typing import IO, Any, AnyStr, Generic, Iterator, List, Text, Type, TypeVar
from typing import IO, Any, AnyStr, Generic, Iterator, Text, Type, TypeVar
_T = TypeVar("_T")
@@ -43,6 +43,6 @@ def get_text_stream(name: str, encoding: str | None = ..., errors: str = ...) ->
def open_file(
filename: str, mode: str = ..., encoding: str | None = ..., errors: str = ..., lazy: bool = ..., atomic: bool = ...
) -> Any: ... # really IO | LazyFile | KeepOpenFile
def get_os_args() -> List[str]: ...
def get_os_args() -> list[str]: ...
def format_filename(filename: str, shorten: bool = ...) -> str: ...
def get_app_dir(app_name: str, roaming: bool = ..., force_posix: bool = ...) -> str: ...

View File

@@ -1,5 +1,5 @@
import datetime
from typing import Any, Dict, Iterator, List, Text, Tuple, Type, TypeVar, Union
from typing import Any, Iterator, Text, Tuple, Type, TypeVar, Union
_RetType = Union[Type[float], Type[datetime.datetime]]
_SelfT = TypeVar("_SelfT", bound=croniter)
@@ -13,15 +13,15 @@ class croniter(Iterator[Any]):
MONTHS_IN_YEAR: int
RANGES: Tuple[Tuple[int, int], ...]
DAYS: Tuple[int, ...]
ALPHACONV: Tuple[Dict[str, Any], ...]
LOWMAP: Tuple[Dict[int, Any], ...]
ALPHACONV: Tuple[dict[str, Any], ...]
LOWMAP: Tuple[dict[int, Any], ...]
bad_length: str
tzinfo: datetime.tzinfo | None
cur: float
expanded: List[List[str]]
expanded: list[list[str]]
start_time: float
dst_start_time: float
nth_weekday_of_month: Dict[str, Any]
nth_weekday_of_month: dict[str, Any]
def __init__(
self,
expr_format: Text,
@@ -45,6 +45,6 @@ class croniter(Iterator[Any]):
def iter(self, ret_type: _RetType | None = ...) -> Iterator[Any]: ...
def is_leap(self, year: int) -> bool: ...
@classmethod
def expand(cls, expr_format: Text) -> Tuple[List[List[str]], Dict[str, Any]]: ...
def expand(cls, expr_format: Text) -> Tuple[list[list[str]], dict[str, Any]]: ...
@classmethod
def is_valid(cls, expression: Text) -> bool: ...

View File

@@ -1,4 +1,4 @@
from typing import List, Text
from typing import Text
class InvalidToken(Exception): ...
@@ -16,7 +16,7 @@ class Fernet(object):
def generate_key(cls) -> bytes: ...
class MultiFernet(object):
def __init__(self, fernets: List[Fernet]) -> None: ...
def __init__(self, fernets: list[Fernet]) -> None: ...
def decrypt(self, token: bytes, ttl: int | None = ...) -> bytes: ...
# See a note above on the typing of the ttl parameter.
def decrypt_at_time(self, token: bytes, ttl: int, current_time: int) -> bytes: ...

View File

@@ -1,4 +1,4 @@
from typing import Any, List, Tuple
from typing import Any, Tuple
from cryptography.hazmat.primitives.asymmetric.dsa import DSAPrivateKeyWithSerialization
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePrivateKeyWithSerialization
@@ -8,11 +8,11 @@ from cryptography.x509 import Certificate
def load_key_and_certificates(
data: bytes, password: bytes | None, backend: Any | None = ...
) -> Tuple[Any | None, Certificate | None, List[Certificate]]: ...
) -> Tuple[Any | None, Certificate | None, list[Certificate]]: ...
def serialize_key_and_certificates(
name: bytes,
key: RSAPrivateKeyWithSerialization | EllipticCurvePrivateKeyWithSerialization | DSAPrivateKeyWithSerialization,
cert: Certificate | None,
cas: List[Certificate] | None,
cas: list[Certificate] | None,
enc: KeySerializationEncryption,
) -> bytes: ...

View File

@@ -1,5 +1,5 @@
from enum import Enum
from typing import Any, Iterable, List
from typing import Any, Iterable
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePrivateKey
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey
@@ -7,8 +7,8 @@ from cryptography.hazmat.primitives.hashes import SHA1, SHA224, SHA256, SHA384,
from cryptography.hazmat.primitives.serialization import Encoding
from cryptography.x509 import Certificate
def load_pem_pkcs7_certificates(data: bytes) -> List[Certificate]: ...
def load_der_pkcs7_certificates(data: bytes) -> List[Certificate]: ...
def load_pem_pkcs7_certificates(data: bytes) -> list[Certificate]: ...
def load_der_pkcs7_certificates(data: bytes) -> list[Certificate]: ...
class PKCS7Options(Enum):
Text: str

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, List, Sequence, Text, Type, TypeVar
from typing import Any, ClassVar, Generator, Generic, Iterable, Sequence, Text, Type, TypeVar
from cryptography.hazmat.backends.interfaces import X509Backend
from cryptography.hazmat.primitives.asymmetric.dsa import DSAPrivateKey, DSAPublicKey
@@ -112,17 +112,17 @@ class NameAttribute(object):
def rfc4514_string(self) -> str: ...
class RelativeDistinguishedName(object):
def __init__(self, attributes: List[NameAttribute]) -> None: ...
def __init__(self, attributes: list[NameAttribute]) -> None: ...
def __iter__(self) -> Generator[NameAttribute, None, None]: ...
def get_attributes_for_oid(self, oid: ObjectIdentifier) -> List[NameAttribute]: ...
def get_attributes_for_oid(self, oid: ObjectIdentifier) -> list[NameAttribute]: ...
def rfc4514_string(self) -> str: ...
class Name(object):
rdns: List[RelativeDistinguishedName]
rdns: list[RelativeDistinguishedName]
def __init__(self, attributes: Sequence[NameAttribute | RelativeDistinguishedName]) -> None: ...
def __iter__(self) -> Generator[NameAttribute, None, None]: ...
def __len__(self) -> int: ...
def get_attributes_for_oid(self, oid: ObjectIdentifier) -> List[NameAttribute]: ...
def get_attributes_for_oid(self, oid: ObjectIdentifier) -> list[NameAttribute]: ...
def public_bytes(self, backend: X509Backend | None = ...) -> bytes: ...
def rfc4514_string(self) -> str: ...
@@ -290,7 +290,7 @@ class Extension(Generic[_T]):
value: _T
class Extensions(object):
def __init__(self, general_names: List[Extension[Any]]) -> None: ...
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]: ...
@@ -304,20 +304,20 @@ class ExtensionNotFound(Exception):
def __init__(self, msg: str, oid: ObjectIdentifier) -> None: ...
class IssuerAlternativeName(ExtensionType):
def __init__(self, general_names: List[GeneralName]) -> None: ...
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 __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
def key_identifier(self) -> bytes: ...
@property
def authority_cert_issuer(self) -> List[GeneralName] | None: ...
def authority_cert_issuer(self) -> list[GeneralName] | None: ...
@property
def authority_cert_serial_number(self) -> int | None: ...
def __init__(

View File

@@ -1,5 +1,3 @@
from typing import Dict
from cryptography.hazmat.primitives.hashes import HashAlgorithm
from cryptography.x509 import ObjectIdentifier
@@ -101,6 +99,6 @@ class CertificatePoliciesOID:
CPS_USER_NOTICE: ObjectIdentifier = ...
ANY_POLICY: ObjectIdentifier = ...
_OID_NAMES: Dict[ObjectIdentifier, str] = ...
_OID_NAMES: dict[ObjectIdentifier, str] = ...
_SIG_OIDS_TO_HASH: Dict[ObjectIdentifier, HashAlgorithm | None] = ...
_SIG_OIDS_TO_HASH: dict[ObjectIdentifier, HashAlgorithm | None] = ...

View File

@@ -1,5 +1,5 @@
import sys
from typing import Any, Callable, Dict, Generic, Iterable, List, Mapping, Tuple, Type, TypeVar, overload
from typing import Any, Callable, Generic, Iterable, Mapping, Tuple, Type, TypeVar, overload
if sys.version_info >= (3, 9):
from types import GenericAlias
@@ -11,13 +11,13 @@ class _MISSING_TYPE: ...
MISSING: _MISSING_TYPE
@overload
def asdict(obj: Any) -> Dict[str, Any]: ...
def asdict(obj: Any) -> dict[str, Any]: ...
@overload
def asdict(obj: Any, *, dict_factory: Callable[[List[Tuple[str, Any]]], _T]) -> _T: ...
def asdict(obj: Any, *, dict_factory: Callable[[list[Tuple[str, Any]]], _T]) -> _T: ...
@overload
def astuple(obj: Any) -> Tuple[Any, ...]: ...
@overload
def astuple(obj: Any, *, tuple_factory: Callable[[List[Any]], _T]) -> _T: ...
def astuple(obj: Any, *, tuple_factory: Callable[[list[Any]], _T]) -> _T: ...
@overload
def dataclass(_cls: Type[_T]) -> Type[_T]: ...
@overload
@@ -80,7 +80,7 @@ def make_dataclass(
fields: Iterable[str | Tuple[str, type] | Tuple[str, type, Field[Any]]],
*,
bases: Tuple[type, ...] = ...,
namespace: Dict[str, Any] | None = ...,
namespace: dict[str, Any] | None = ...,
init: bool = ...,
repr: bool = ...,
eq: bool = ...,

View File

@@ -1,13 +1,13 @@
import datetime
from typing import Any, List, Mapping, Set, Tuple
from typing import Any, Mapping, Set, Tuple
__version__: str
def parse(
date_string: str,
date_formats: List[str] | Tuple[str] | Set[str] | None = ...,
languages: List[str] | Tuple[str] | Set[str] | None = ...,
locales: List[str] | Tuple[str] | Set[str] | None = ...,
date_formats: list[str] | Tuple[str] | Set[str] | None = ...,
languages: list[str] | Tuple[str] | Set[str] | None = ...,
locales: list[str] | Tuple[str] | Set[str] | None = ...,
region: str | None = ...,
settings: Mapping[str, Any] | None = ...,
) -> datetime.datetime | None: ...

View File

@@ -1,4 +1,4 @@
from typing import Dict, List, Pattern, Text, Tuple
from typing import Pattern, Text, Tuple
from typing_extensions import Literal
_DEFAULT_DELIMITER: str
@@ -12,6 +12,6 @@ def emojize(
) -> str: ...
def demojize(string: str, use_aliases: bool = ..., delimiters: Tuple[str, str] = ..., language: str = ...) -> str: ...
def get_emoji_regexp(language: str = ...) -> Pattern[Text]: ...
def emoji_lis(string: str, language: str = ...) -> List[Dict[str, int | str]]: ...
def distinct_emoji_lis(string: str) -> List[str]: ...
def emoji_lis(string: str, language: str = ...) -> list[dict[str, int | str]]: ...
def distinct_emoji_lis(string: str) -> list[str]: ...
def emoji_count(string: str) -> int: ...

View File

@@ -1,4 +1,4 @@
from typing import Dict, Text
from typing import Text
from .en import (
EMOJI_ALIAS_UNICODE_ENGLISH as EMOJI_ALIAS_UNICODE_ENGLISH,
@@ -10,5 +10,5 @@ from .es import EMOJI_UNICODE_SPANISH as EMOJI_UNICODE_SPANISH, UNICODE_EMOJI_SP
from .it import EMOJI_UNICODE_ITALIAN as EMOJI_UNICODE_ITALIAN, UNICODE_EMOJI_ITALIAN as UNICODE_EMOJI_ITALIAN
from .pt import EMOJI_UNICODE_PORTUGUESE as EMOJI_UNICODE_PORTUGUESE, UNICODE_EMOJI_PORTUGUESE as UNICODE_EMOJI_PORTUGUESE
EMOJI_UNICODE: Dict[str, Dict[Text, Text]]
UNICODE_EMOJI: Dict[str, Dict[Text, Text]]
EMOJI_UNICODE: dict[str, dict[Text, Text]]
UNICODE_EMOJI: dict[str, dict[Text, Text]]

View File

@@ -1,6 +1,6 @@
from typing import Dict, Text
from typing import Text
EMOJI_ALIAS_UNICODE_ENGLISH: Dict[Text, Text]
EMOJI_UNICODE_ENGLISH: Dict[Text, Text]
UNICODE_EMOJI_ENGLISH: Dict[Text, Text]
UNICODE_EMOJI_ALIAS_ENGLISH: Dict[Text, Text]
EMOJI_ALIAS_UNICODE_ENGLISH: dict[Text, Text]
EMOJI_UNICODE_ENGLISH: dict[Text, Text]
UNICODE_EMOJI_ENGLISH: dict[Text, Text]
UNICODE_EMOJI_ALIAS_ENGLISH: dict[Text, Text]

View File

@@ -1,4 +1,4 @@
from typing import Dict, Text
from typing import Text
EMOJI_UNICODE_SPANISH: Dict[Text, Text]
UNICODE_EMOJI_SPANISH: Dict[Text, Text]
EMOJI_UNICODE_SPANISH: dict[Text, Text]
UNICODE_EMOJI_SPANISH: dict[Text, Text]

View File

@@ -1,4 +1,4 @@
from typing import Dict, Text
from typing import Text
EMOJI_UNICODE_ITALIAN: Dict[Text, Text]
UNICODE_EMOJI_ITALIAN: Dict[Text, Text]
EMOJI_UNICODE_ITALIAN: dict[Text, Text]
UNICODE_EMOJI_ITALIAN: dict[Text, Text]

View File

@@ -1,4 +1,4 @@
from typing import Dict, Text
from typing import Text
EMOJI_UNICODE_PORTUGUESE: Dict[Text, Text]
UNICODE_EMOJI_PORTUGUESE: Dict[Text, Text]
EMOJI_UNICODE_PORTUGUESE: dict[Text, Text]
UNICODE_EMOJI_PORTUGUESE: dict[Text, Text]

View File

@@ -76,10 +76,10 @@ class NonCallableMock(Base, Any): # type: ignore
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 = ...,

View File

@@ -1,6 +1,6 @@
import abc
import sys
from typing import Any, Callable, Dict, Generic, ItemsView, KeysView, Mapping, Type, TypeVar, Union, ValuesView
from typing import Any, Callable, Generic, ItemsView, KeysView, Mapping, Type, TypeVar, Union, 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,4 +1,4 @@
from typing import Any, Callable, Dict, Iterable, Iterator, List, Text, Tuple, TypeVar
from typing import Any, Callable, Dict, Iterable, Iterator, Text, Tuple, TypeVar
from typing_extensions import TypedDict
_T = TypeVar("_T")
@@ -6,7 +6,7 @@ _Callback = Callable[[str, _Result], Any]
class _Result(TypedDict):
nmap: _ResultNmap
scan: Dict[str, PortScannerHostDict]
scan: dict[str, PortScannerHostDict]
class _ResultNmap(TypedDict):
command_line: str
@@ -53,7 +53,7 @@ class PortScanner(object):
def __init__(self, nmap_search_path: Iterable[str] = ...) -> None: ...
def get_nmap_last_output(self) -> Text: ...
def nmap_version(self) -> Tuple[int, int]: ...
def listscan(self, hosts: str = ...) -> List[str]: ...
def listscan(self, hosts: str = ...) -> list[str]: ...
def scan(self, hosts: Text = ..., ports: Text | None = ..., arguments: Text = ..., sudo: bool = ...) -> _Result: ...
def analyse_nmap_xml_scan(
self,
@@ -63,7 +63,7 @@ class PortScanner(object):
nmap_warn_keep_trace: str = ...,
) -> _Result: ...
def __getitem__(self, host: Text) -> PortScannerHostDict: ...
def all_hosts(self) -> List[str]: ...
def all_hosts(self) -> list[str]: ...
def command_line(self) -> str: ...
def scaninfo(self) -> _ResultNmapInfo: ...
def scanstats(self) -> _ResultNampStats: ...
@@ -99,21 +99,21 @@ class PortScannerYield(PortScannerAsync):
def still_scanning(self) -> None: ... # type: ignore
class PortScannerHostDict(Dict[str, Any]):
def hostnames(self) -> List[_ResultHostNames]: ...
def hostnames(self) -> list[_ResultHostNames]: ...
def hostname(self) -> str: ...
def state(self) -> str: ...
def uptime(self) -> _ResulHostUptime: ...
def all_protocols(self) -> List[str]: ...
def all_tcp(self) -> List[int]: ...
def all_protocols(self) -> list[str]: ...
def all_tcp(self) -> list[int]: ...
def has_tcp(self, port: int) -> bool: ...
def tcp(self, port: int) -> _ResultHostPort: ...
def all_udp(self) -> List[int]: ...
def all_udp(self) -> list[int]: ...
def has_udp(self, port: int) -> bool: ...
def udp(self, port: int) -> _ResultHostPort: ...
def all_ip(self) -> List[int]: ...
def all_ip(self) -> list[int]: ...
def has_ip(self, port: int) -> bool: ...
def ip(self, port: int) -> _ResultHostPort: ...
def all_sctp(self) -> List[int]: ...
def all_sctp(self) -> list[int]: ...
def has_sctp(self, port: int) -> bool: ...
def sctp(self, port: int) -> _ResultHostPort: ...

View File

@@ -1,6 +1,6 @@
from socket import _RetAddress, socket
from threading import Thread
from typing import Dict, Protocol, Tuple
from typing import Protocol, Tuple
from paramiko.channel import Channel
from paramiko.message import Message
@@ -45,7 +45,7 @@ class AgentServerProxy(AgentSSH):
def __del__(self) -> None: ...
def connect(self) -> None: ...
def close(self) -> None: ...
def get_env(self) -> Dict[str, str]: ...
def get_env(self) -> dict[str, str]: ...
class AgentRequestHandler:
def __init__(self, chanClient: Channel) -> None: ...

View File

@@ -32,7 +32,7 @@ class AuthHandler:
def auth_gssapi_with_mic(self, username: str, gss_host: str, gss_deleg_creds: bool, event: Event) -> None: ...
def auth_gssapi_keyex(self, username: str, event: Event) -> None: ...
def abort(self) -> None: ...
def wait_for_response(self, event: Event) -> List[str]: ...
def wait_for_response(self, event: Event) -> list[str]: ...
class GssapiWithMicAuthHandler:
method: str

View File

@@ -1,4 +1,4 @@
from typing import Any, Iterable, List
from typing import Any, Iterable
class BERException(Exception): ...
@@ -7,10 +7,10 @@ class BER:
idx: int
def __init__(self, content: bytes = ...) -> None: ...
def asbytes(self) -> bytes: ...
def decode(self) -> None | int | List[int]: ...
def decode_next(self) -> None | int | List[int]: ...
def decode(self) -> None | int | list[int]: ...
def decode_next(self) -> None | int | list[int]: ...
@staticmethod
def decode_sequence(data: bytes) -> List[int | List[int]]: ...
def decode_sequence(data: bytes) -> list[int | list[int]]: ...
def encode_tlv(self, ident: int, val: bytes) -> None: ...
def encode(self, x: Any) -> None: ...
@staticmethod

View File

@@ -1,5 +1,5 @@
from socket import socket
from typing import Dict, Iterable, Mapping, NoReturn, Tuple, Type
from typing import Iterable, Mapping, NoReturn, Tuple, Type
from paramiko.channel import Channel, ChannelFile, ChannelStderrFile, ChannelStdinFile
from paramiko.hostkeys import HostKeys
@@ -37,7 +37,7 @@ class SSHClient(ClosingContextManager):
auth_timeout: float | None = ...,
gss_trust_dns: bool = ...,
passphrase: str | None = ...,
disabled_algorithms: Dict[str, Iterable[str]] | None = ...,
disabled_algorithms: dict[str, Iterable[str]] | None = ...,
) -> None: ...
def close(self) -> None: ...
def exec_command(
@@ -46,7 +46,7 @@ class SSHClient(ClosingContextManager):
bufsize: int = ...,
timeout: float | None = ...,
get_pty: bool = ...,
environment: Dict[str, str] | None = ...,
environment: dict[str, str] | None = ...,
) -> Tuple[ChannelStdinFile, ChannelFile, ChannelStderrFile]: ...
def invoke_shell(
self,

View File

@@ -1,5 +1,5 @@
import sys
from typing import Dict, Protocol, Text, Union
from typing import Protocol, Text, Union
MSG_DISCONNECT: int
MSG_IGNORE: int
@@ -74,7 +74,7 @@ cMSG_CHANNEL_REQUEST: bytes
cMSG_CHANNEL_SUCCESS: bytes
cMSG_CHANNEL_FAILURE: bytes
MSG_NAMES: Dict[int, str]
MSG_NAMES: dict[int, str]
AUTH_SUCCESSFUL: int
AUTH_PARTIALLY_SUCCESSFUL: int
@@ -86,7 +86,7 @@ OPEN_FAILED_CONNECT_FAILED: int
OPEN_FAILED_UNKNOWN_CHANNEL_TYPE: int
OPEN_FAILED_RESOURCE_SHORTAGE: int
CONNECTION_FAILED_CODE: Dict[int, str]
CONNECTION_FAILED_CODE: dict[int, str]
DISCONNECT_SERVICE_NOT_AVAILABLE: int
DISCONNECT_AUTH_CANCELLED_BY_USER: int

View File

@@ -1,4 +1,4 @@
from typing import IO, Any, Dict, Iterable, List, Pattern, Set
from typing import IO, Any, Dict, Iterable, Pattern, Set
from paramiko.ssh_exception import ConfigParseError as ConfigParseError, CouldNotCanonicalize as CouldNotCanonicalize
@@ -6,7 +6,7 @@ SSH_PORT: int
class SSHConfig:
SETTINGS_REGEX: Pattern[str]
TOKENS_BY_CONFIG_KEY: Dict[str, List[str]]
TOKENS_BY_CONFIG_KEY: dict[str, list[str]]
def __init__(self) -> None: ...
@classmethod
def from_text(cls, text: str) -> SSHConfig: ...

View File

@@ -1,4 +1,4 @@
from typing import IO, Any, Callable, List, Sequence, Tuple, Type
from typing import IO, Any, Callable, Sequence, Tuple, Type
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve, EllipticCurvePrivateKey, EllipticCurvePublicKey
from cryptography.hazmat.primitives.hashes import HashAlgorithm
@@ -16,7 +16,7 @@ class _ECDSACurve:
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_key_format_identifier_list(self) -> list[str]: ...
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: ...
@@ -37,7 +37,7 @@ class ECDSAKey(PKey):
validate_point: bool = ...,
) -> None: ...
@classmethod
def supported_key_format_identifiers(cls: Any) -> List[str]: ...
def supported_key_format_identifiers(cls: Any) -> list[str]: ...
def asbytes(self) -> bytes: ...
def __hash__(self) -> int: ...
def get_name(self) -> str: ...

View File

@@ -1,4 +1,4 @@
from typing import Any, AnyStr, Generic, Iterable, List, Tuple
from typing import Any, AnyStr, Generic, Iterable, Tuple
from paramiko.util import ClosingContextManager
@@ -28,7 +28,7 @@ class BufferedFile(ClosingContextManager, Generic[AnyStr]):
def readinto(self, buff: bytearray) -> int: ...
def read(self, size: int | None = ...) -> bytes: ...
def readline(self, size: int | None = ...) -> AnyStr: ...
def readlines(self, sizehint: int | None = ...) -> List[AnyStr]: ...
def readlines(self, sizehint: int | None = ...) -> list[AnyStr]: ...
def seek(self, offset: int, whence: int = ...) -> None: ...
def tell(self) -> int: ...
def write(self, data: AnyStr) -> None: ...

View File

@@ -1,16 +1,16 @@
from typing import Iterator, List, Mapping, MutableMapping
from typing import Iterator, Mapping, MutableMapping
from paramiko.pkey import PKey
class _SubDict(MutableMapping[str, PKey]):
# Internal to HostKeys.lookup()
def __init__(self, hostname: str, entries: List[HostKeyEntry], hostkeys: HostKeys) -> None: ...
def __init__(self, hostname: str, entries: list[HostKeyEntry], hostkeys: HostKeys) -> None: ...
def __iter__(self) -> Iterator[str]: ...
def __len__(self) -> int: ...
def __delitem__(self, key: str) -> None: ...
def __getitem__(self, key: str) -> PKey: ...
def __setitem__(self, key: str, val: PKey) -> None: ...
def keys(self) -> List[str]: ... # type: ignore
def keys(self) -> list[str]: ... # type: ignore
class HostKeys(MutableMapping[str, _SubDict]):
def __init__(self, filename: str | None = ...) -> None: ...
@@ -25,8 +25,8 @@ class HostKeys(MutableMapping[str, _SubDict]):
def __getitem__(self, key: str) -> _SubDict: ...
def __delitem__(self, key: str) -> None: ...
def __setitem__(self, hostname: str, entry: Mapping[str, PKey]) -> None: ...
def keys(self) -> List[str]: ... # type: ignore
def values(self) -> List[_SubDict]: ... # type: ignore
def keys(self) -> list[str]: ... # type: ignore
def values(self) -> list[_SubDict]: ... # type: ignore
@staticmethod
def hash_host(hostname: str, salt: str | None = ...) -> str: ...
@@ -39,7 +39,7 @@ class HostKeyEntry:
valid: bool
hostnames: str
key: PKey
def __init__(self, hostnames: List[str] | None = ..., key: PKey | None = ...) -> None: ...
def __init__(self, hostnames: list[str] | None = ..., key: PKey | None = ...) -> None: ...
@classmethod
def from_line(cls, line: str, lineno: int | None = ...) -> HostKeyEntry | None: ...
def to_line(self) -> str | None: ...

View File

@@ -1,5 +1,5 @@
import sys
from typing import Any, Iterable, List, Text
from typing import Any, Iterable, Text
from .common import _LikeBytes
@@ -29,7 +29,7 @@ class Message:
def get_string(self) -> bytes: ...
def get_text(self) -> Text: ...
def get_binary(self) -> bytes: ...
def get_list(self) -> List[str]: ...
def get_list(self) -> list[str]: ...
def add_bytes(self, b: bytes) -> Message: ...
def add_byte(self, b: bytes) -> Message: ...
def add_boolean(self, b: bool) -> Message: ...

View File

@@ -1,8 +1,8 @@
from typing import Dict, List, Tuple
from typing import Tuple
class ModulusPack:
pack: Dict[int, List[Tuple[int, int]]]
discarded: List[Tuple[int, str]]
pack: dict[int, list[Tuple[int, int]]]
discarded: list[Tuple[int, str]]
def __init__(self) -> None: ...
def read_file(self, filename: str) -> None: ...
def get_modulus(self, min: int, prefer: int, max: int) -> Tuple[int, int]: ...

View File

@@ -1,10 +1,10 @@
from subprocess import Popen
from typing import Any, List
from typing import Any
from paramiko.util import ClosingContextManager
class ProxyCommand(ClosingContextManager):
cmd: List[str]
cmd: list[str]
process: Popen[Any]
timeout: float | None
def __init__(self, command_line: str) -> None: ...

View File

@@ -1,5 +1,5 @@
import threading
from typing import Any, List, Tuple
from typing import Any, Tuple
from paramiko.channel import Channel
from paramiko.message import Message
@@ -13,7 +13,7 @@ class ServerInterface:
def check_auth_password(self, username: str, password: str) -> int: ...
def check_auth_publickey(self, username: str, key: PKey) -> int: ...
def check_auth_interactive(self, username: str, submethods: str) -> int | InteractiveQuery: ...
def check_auth_interactive_response(self, responses: List[str]) -> int | InteractiveQuery: ...
def check_auth_interactive_response(self, responses: list[str]) -> int | InteractiveQuery: ...
def check_auth_gssapi_with_mic(self, username: str, gss_authenticated: int = ..., cc_file: str | None = ...) -> int: ...
def check_auth_gssapi_keyex(self, username: str, gss_authenticated: int = ..., cc_file: str | None = ...) -> int: ...
def enable_auth_gssapi(self) -> bool: ...
@@ -40,7 +40,7 @@ class ServerInterface:
class InteractiveQuery:
name: str
instructions: str
prompts: List[Tuple[str, bool]]
prompts: list[Tuple[str, bool]]
def __init__(self, name: str = ..., instructions: str = ..., *prompts: str | Tuple[str, bool]) -> None: ...
def add_prompt(self, prompt: str, echo: bool = ...) -> None: ...

View File

@@ -1,5 +1,4 @@
from logging import Logger
from typing import Dict, List
from paramiko.channel import Channel
@@ -41,7 +40,7 @@ SFTP_NO_CONNECTION: int
SFTP_CONNECTION_LOST: int
SFTP_OP_UNSUPPORTED: int
SFTP_DESC: List[str]
SFTP_DESC: list[str]
SFTP_FLAG_READ: int
SFTP_FLAG_WRITE: int
@@ -50,7 +49,7 @@ SFTP_FLAG_CREATE: int
SFTP_FLAG_TRUNC: int
SFTP_FLAG_EXCL: int
CMD_NAMES: Dict[int, str]
CMD_NAMES: dict[int, str]
class SFTPError(Exception): ...

View File

@@ -1,5 +1,4 @@
from os import stat_result
from typing import Dict
class SFTPAttributes:
FLAG_SIZE: int
@@ -15,7 +14,7 @@ class SFTPAttributes:
st_mtime: int | None
filename: str # only when from_stat() is used
longname: str # only when from_stat() is used
attr: Dict[str, str]
attr: dict[str, str]
def __init__(self) -> None: ...
@classmethod
def from_stat(cls, obj: stat_result, filename: str | None = ...) -> SFTPAttributes: ...

View File

@@ -1,5 +1,5 @@
from logging import Logger
from typing import IO, Any, Callable, Iterator, List, Text, Tuple
from typing import IO, Any, Callable, Iterator, Text, Tuple
from paramiko.channel import Channel
from paramiko.sftp import BaseSFTP
@@ -24,8 +24,8 @@ class SFTPClient(BaseSFTP, ClosingContextManager):
) -> SFTPClient | None: ...
def close(self) -> None: ...
def get_channel(self) -> Channel | None: ...
def listdir(self, path: str = ...) -> List[str]: ...
def listdir_attr(self, path: str = ...) -> List[SFTPAttributes]: ...
def listdir(self, path: str = ...) -> list[str]: ...
def listdir_attr(self, path: str = ...) -> list[SFTPAttributes]: ...
def listdir_iter(self, path: bytes | Text = ..., read_aheads: int = ...) -> Iterator[SFTPAttributes]: ...
def open(self, filename: bytes | Text, mode: str = ..., bufsize: int = ...) -> SFTPFile: ...
file = open

View File

@@ -1,5 +1,5 @@
from logging import Logger
from typing import Any, Dict, Type
from typing import Any, Type
from paramiko.channel import Channel
from paramiko.server import ServerInterface, SubsystemHandler
@@ -13,8 +13,8 @@ class SFTPServer(BaseSFTP, SubsystemHandler):
logger: Logger
ultra_debug: bool
next_handle: int
file_table: Dict[bytes, SFTPHandle]
folder_table: Dict[bytes, SFTPHandle]
file_table: dict[bytes, SFTPHandle]
folder_table: dict[bytes, SFTPHandle]
server: SFTPServerInterface
sock: Channel | None
def __init__(

View File

@@ -1,4 +1,4 @@
from typing import Any, List
from typing import Any
from paramiko.server import ServerInterface
from paramiko.sftp_attr import SFTPAttributes
@@ -9,7 +9,7 @@ class SFTPServerInterface:
def session_started(self) -> None: ...
def session_ended(self) -> None: ...
def open(self, path: str, flags: int, attr: SFTPAttributes) -> SFTPHandle | int: ...
def list_folder(self, path: str) -> List[SFTPAttributes] | int: ...
def list_folder(self, path: str) -> list[SFTPAttributes] | int: ...
def stat(self, path: str) -> SFTPAttributes | int: ...
def lstat(self, path: str) -> SFTPAttributes | int: ...
def remove(self, path: str) -> int: ...

View File

@@ -1,5 +1,5 @@
import socket
from typing import List, Mapping, Tuple
from typing import Mapping, Tuple
from paramiko.pkey import PKey
@@ -8,13 +8,13 @@ class AuthenticationException(SSHException): ...
class PasswordRequiredException(AuthenticationException): ...
class BadAuthenticationType(AuthenticationException):
allowed_types: List[str]
allowed_types: list[str]
explanation: str
def __init__(self, explanation: str, types: List[str]) -> None: ...
def __init__(self, explanation: str, types: list[str]) -> None: ...
class PartialAuthentication(AuthenticationException):
allowed_types: List[str]
def __init__(self, types: List[str]) -> None: ...
allowed_types: list[str]
def __init__(self, types: list[str]) -> None: ...
class ChannelException(SSHException):
code: int

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, Dict, Iterable, List, Protocol, Sequence, Tuple, Type
from typing import Any, Callable, Iterable, Protocol, Sequence, Tuple, Type
from paramiko.auth_handler import AuthHandler, _InteractiveCallback
from paramiko.channel import Channel
@@ -45,8 +45,8 @@ class Transport(Thread, ClosingContextManager):
in_kex: bool
authenticated: bool
lock: Lock
channel_events: Dict[int, Event]
channels_seen: Dict[int, bool]
channel_events: dict[int, Event]
channels_seen: dict[int, bool]
default_max_packet_size: int
default_window_size: int
saved_exception: Exception | None
@@ -61,13 +61,13 @@ class Transport(Thread, ClosingContextManager):
banner_timeout: float
handshake_timeout: float
auth_timeout: float
disabled_algorithms: Dict[str, Iterable[str]] | None
disabled_algorithms: dict[str, Iterable[str]] | None
server_mode: bool
server_object: ServerInterface | None
server_key_dict: Dict[str, PKey]
server_accepts: List[Channel]
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,
@@ -76,7 +76,7 @@ class Transport(Thread, ClosingContextManager):
default_max_packet_size: int = ...,
gss_kex: bool = ...,
gss_deleg_creds: bool = ...,
disabled_algorithms: Dict[str, Iterable[str]] | None = ...,
disabled_algorithms: dict[str, Iterable[str]] | None = ...,
) -> None: ...
@property
def preferred_ciphers(self) -> Sequence[str]: ...
@@ -142,15 +142,15 @@ class Transport(Thread, ClosingContextManager):
def is_authenticated(self) -> bool: ...
def get_username(self) -> str | None: ...
def get_banner(self) -> bytes | None: ...
def auth_none(self, username: str) -> List[str]: ...
def auth_password(self, username: str, password: str, event: Event | None = ..., fallback: bool = ...) -> List[str]: ...
def auth_publickey(self, username: str, key: PKey, event: Event | None = ...) -> List[str]: ...
def auth_interactive(self, username: str, handler: _InteractiveCallback, submethods: str = ...) -> List[str]: ...
def auth_none(self, username: str) -> list[str]: ...
def auth_password(self, username: str, password: str, event: Event | None = ..., fallback: bool = ...) -> list[str]: ...
def auth_publickey(self, username: str, key: PKey, event: Event | None = ...) -> list[str]: ...
def auth_interactive(self, username: str, handler: _InteractiveCallback, submethods: str = ...) -> list[str]: ...
def auth_interactive_dumb(
self, username: str, handler: _InteractiveCallback | None = ..., submethods: str = ...
) -> List[str]: ...
def auth_gssapi_with_mic(self, username: str, gss_host: str, gss_deleg_creds: bool) -> List[str]: ...
def auth_gssapi_keyex(self, username: str) -> List[str]: ...
) -> list[str]: ...
def auth_gssapi_with_mic(self, username: str, gss_host: str, gss_deleg_creds: bool) -> list[str]: ...
def auth_gssapi_keyex(self, username: str) -> list[str]: ...
def set_log_channel(self, name: str) -> None: ...
def get_log_channel(self) -> str: ...
def set_hexdump(self, hexdump: bool) -> None: ...
@@ -188,5 +188,5 @@ class ChannelMap:
def put(self, chanid: int, chan: Channel) -> None: ...
def get(self, chanid: int) -> Channel: ...
def delete(self, chanid: int) -> None: ...
def values(self) -> List[Channel]: ...
def values(self) -> list[Channel]: ...
def __len__(self) -> int: ...

View File

@@ -1,7 +1,7 @@
import sys
from logging import Logger, LogRecord
from types import TracebackType
from typing import IO, AnyStr, Callable, List, Protocol, Type, TypeVar
from typing import IO, AnyStr, Callable, Protocol, Type, TypeVar
from paramiko.config import SSHConfig, SSHConfigDict
from paramiko.hostkeys import HostKeys
@@ -23,11 +23,11 @@ deflate_zero: int
deflate_ff: int
def deflate_long(n: int, add_sign_padding: bool = ...) -> bytes: ...
def format_binary(data: bytes, prefix: str = ...) -> List[str]: ...
def format_binary(data: bytes, prefix: str = ...) -> list[str]: ...
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 tb_strings() -> list[str]: ...
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: ...

View File

@@ -1,5 +1,5 @@
import textwrap
from typing import IO, Any, Callable, Dict, Generic, List, Text, Tuple, Type, TypeVar, overload
from typing import IO, Any, Callable, Generic, List, Text, Tuple, Type, TypeVar, overload
from typing_extensions import SupportsIndex
_TB = TypeVar("_TB", bound="_BaseEntry")
@@ -29,7 +29,7 @@ class _BaseFile(List[_TB]):
encoding: Text
check_for_duplicates: bool
header: Text
metadata: Dict[Text, Text]
metadata: dict[Text, Text]
metadata_is_fuzzy: bool
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def __unicode__(self) -> Text: ...
@@ -47,10 +47,10 @@ class POFile(_BaseFile[POEntry]):
def __unicode__(self) -> Text: ...
def save_as_mofile(self, fpath: Text) -> None: ...
def percent_translated(self) -> int: ...
def translated_entries(self) -> List[POEntry]: ...
def untranslated_entries(self) -> List[POEntry]: ...
def fuzzy_entries(self) -> List[POEntry]: ...
def obsolete_entries(self) -> List[POEntry]: ...
def translated_entries(self) -> list[POEntry]: ...
def untranslated_entries(self) -> list[POEntry]: ...
def fuzzy_entries(self) -> list[POEntry]: ...
def obsolete_entries(self) -> list[POEntry]: ...
def merge(self, refpot: POFile) -> None: ...
class MOFile(_BaseFile[MOEntry]):
@@ -62,16 +62,16 @@ class MOFile(_BaseFile[MOEntry]):
def save_as_pofile(self, fpath: str) -> None: ...
def save(self, fpath: Text | None = ...) -> None: ... # type: ignore # binary file does not allow argument repr_method
def percent_translated(self) -> int: ...
def translated_entries(self) -> List[MOEntry]: ...
def untranslated_entries(self) -> List[MOEntry]: ...
def fuzzy_entries(self) -> List[MOEntry]: ...
def obsolete_entries(self) -> List[MOEntry]: ...
def translated_entries(self) -> list[MOEntry]: ...
def untranslated_entries(self) -> list[MOEntry]: ...
def fuzzy_entries(self) -> list[MOEntry]: ...
def obsolete_entries(self) -> list[MOEntry]: ...
class _BaseEntry(object):
msgid: Text
msgstr: Text
msgid_plural: Text
msgstr_plural: List[Text]
msgstr_plural: list[Text]
msgctxt: Text
obsolete: bool
encoding: str
@@ -82,8 +82,8 @@ class _BaseEntry(object):
class POEntry(_BaseEntry):
comment: Text
tcomment: Text
occurrences: List[Tuple[str, int]]
flags: List[Text]
occurrences: list[Tuple[str, int]]
flags: list[Text]
previous_msgctxt: Text | None
previous_msgid: Text | None
previous_msgid_plural: Text | None
@@ -108,8 +108,8 @@ class POEntry(_BaseEntry):
class MOEntry(_BaseEntry):
comment: Text
tcomment: Text
occurrences: List[Tuple[str, int]]
flags: List[Text]
occurrences: list[Tuple[str, int]]
flags: list[Text]
previous_msgctxt: Text | None
previous_msgid: Text | None
previous_msgid_plural: Text | None
@@ -119,7 +119,7 @@ class MOEntry(_BaseEntry):
class _POFileParser(Generic[_TP]):
fhandle: IO[Text]
instance: _TP
transitions: Dict[Tuple[str, str], Tuple[Callable[[], bool], str]]
transitions: dict[Tuple[str, str], Tuple[Callable[[], bool], str]]
current_line: int
current_entry: POEntry
current_state: str
@@ -128,7 +128,7 @@ class _POFileParser(Generic[_TP]):
entry_obsolete: int
def __init__(self, pofile: Text, *args: Any, **kwargs: Any) -> None: ...
def parse(self) -> _TP: ...
def add(self, symbol: str, states: List[str], next_state: str) -> None: ...
def add(self, symbol: str, states: list[str], next_state: str) -> None: ...
def process(self, symbol: str) -> None: ...
def handle_he(self) -> bool: ...
def handle_tc(self) -> bool: ...

View File

@@ -1,5 +1,5 @@
from datetime import datetime
from typing import Any, Callable, Iterable, List, Sequence, Set, Text, Tuple, Union
from typing import Any, Callable, Iterable, Sequence, Set, Text, Tuple, Union
from cryptography.hazmat.primitives.asymmetric.dsa import DSAPrivateKey, DSAPublicKey
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey, RSAPublicKey
@@ -45,7 +45,7 @@ class X509Name:
emailAddress: Text
def __init__(self, name: X509Name) -> None: ...
def der(self) -> bytes: ...
def get_components(self) -> List[Tuple[bytes, bytes]]: ...
def get_components(self) -> list[Tuple[bytes, bytes]]: ...
def hash(self) -> int: ...
class X509:
@@ -83,7 +83,7 @@ class X509Req:
def add_extensions(self, extensions: Iterable[X509Extension]) -> None: ...
@classmethod
def from_cryptography(cls, crypto_req: CertificateSigningRequest) -> X509Req: ...
def get_extensions(self) -> List[X509Extension]: ...
def get_extensions(self) -> list[X509Extension]: ...
def get_pubkey(self) -> PKey: ...
def get_subject(self) -> X509Name: ...
def get_version(self) -> int: ...
@@ -103,7 +103,7 @@ class X509Extension:
class Revoked:
def __init__(self) -> None: ...
def all_reasons(self) -> List[bytes]: ...
def all_reasons(self) -> list[bytes]: ...
def get_reason(self) -> bytes | None: ...
def get_rev_date(self) -> bytes: ...
def get_serial(self) -> bytes: ...
@@ -135,7 +135,7 @@ class X509Store:
class X509StoreContext:
def __init__(self, store: X509Store, certificate: X509, chain: Sequence[X509] | None = ...) -> None: ...
def get_verified_chain(self) -> List[X509]: ...
def get_verified_chain(self) -> list[X509]: ...
def set_store(self, store: X509Store) -> None: ...
def verify_certificate(self) -> None: ...

View File

@@ -1,6 +1,6 @@
# TODO(MichalPokorny): more precise types
from typing import Any, List, Text, Tuple
from typing import Any, Text, Tuple
GLOBAL_ACK_EINTR: int
GLOBAL_ALL: int
@@ -39,9 +39,9 @@ class CurlMulti(object):
def add_handle(self, obj: Curl) -> None: ...
def remove_handle(self, obj: Curl) -> None: ...
def perform(self) -> Tuple[Any, int]: ...
def fdset(self) -> Tuple[List[Any], List[Any], List[Any]]: ...
def fdset(self) -> Tuple[list[Any], list[Any], list[Any]]: ...
def select(self, timeout: float = ...) -> int: ...
def info_read(self, max_objects: int = ...) -> Tuple[int, List[Any], List[Any]]: ...
def info_read(self, max_objects: int = ...) -> Tuple[int, list[Any], list[Any]]: ...
def socket_action(self, sockfd: int, ev_bitmask: int) -> Tuple[int, int]: ...
class CurlShare(object):

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, List, Sequence, Text, Tuple, Type, Union
from typing import IO, Any, Callable, ContextManager, Sequence, Text, Tuple, Type, Union
from typing_extensions import Literal
import paramiko
@@ -73,15 +73,15 @@ class Connection:
callback: _Callback | None = ...,
confirm: bool = ...,
) -> paramiko.SFTPAttributes: ...
def execute(self, command: str) -> List[str]: ...
def execute(self, command: str) -> list[str]: ...
def cd(self, remotepath: _Path | None = ...) -> ContextManager[None]: ... # noqa: F811
def chdir(self, remotepath: _Path) -> None: ...
def cwd(self, remotepath: _Path) -> None: ...
def chmod(self, remotepath: _Path, mode: int = ...) -> None: ...
def chown(self, remotepath: _Path, uid: int | None = ..., gid: int | None = ...) -> None: ...
def getcwd(self) -> str: ...
def listdir(self, remotepath: _Path = ...) -> List[str]: ...
def listdir_attr(self, remotepath: _Path = ...) -> List[paramiko.SFTPAttributes]: ...
def listdir(self, remotepath: _Path = ...) -> list[str]: ...
def listdir_attr(self, remotepath: _Path = ...) -> list[paramiko.SFTPAttributes]: ...
def mkdir(self, remotepath: _Path, mode: int = ...) -> None: ...
def normalize(self, remotepath: _Path) -> str: ...
def isdir(self, remotepath: _Path) -> bool: ...

View File

@@ -1,4 +1,4 @@
from typing import Callable, ContextManager, Iterator, List
from typing import Callable, ContextManager, Iterator
def known_hosts() -> str: ...
def st_mode_to_int(val: int) -> int: ...
@@ -9,17 +9,17 @@ class WTCallbacks:
def dir_cb(self, pathname: str) -> None: ...
def unk_cb(self, pathname: str) -> None: ...
@property
def flist(self) -> List[str]: ...
def flist(self) -> list[str]: ...
@flist.setter
def flist(self, val: List[str]) -> None: ...
def flist(self, val: list[str]) -> None: ...
@property
def dlist(self) -> List[str]: ...
def dlist(self) -> list[str]: ...
@dlist.setter
def dlist(self, val: List[str]) -> None: ...
def dlist(self, val: list[str]) -> None: ...
@property
def ulist(self) -> List[str]: ...
def ulist(self) -> list[str]: ...
@ulist.setter
def ulist(self, val: List[str]) -> None: ...
def ulist(self, val: list[str]) -> None: ...
def path_advance(thepath: str, sep: str = ...) -> Iterator[str]: ...
def path_retreat(thepath: str, sep: str = ...) -> Iterator[str]: ...

View File

@@ -1,17 +1,17 @@
from datetime import datetime, tzinfo
from typing import IO, Any, Dict, List, Mapping, Text, Tuple, Union
from typing import IO, Any, Mapping, Text, Tuple, Union
_FileOrStr = Union[bytes, Text, IO[str], IO[Any]]
class parserinfo(object):
JUMP: List[str]
WEEKDAYS: List[Tuple[str, str]]
MONTHS: List[Tuple[str, str]]
HMS: List[Tuple[str, str, str]]
AMPM: List[Tuple[str, str]]
UTCZONE: List[str]
PERTAIN: List[str]
TZOFFSET: Dict[str, int]
JUMP: list[str]
WEEKDAYS: list[Tuple[str, str]]
MONTHS: list[Tuple[str, str]]
HMS: list[Tuple[str, str, str]]
AMPM: list[Tuple[str, str]]
UTCZONE: list[str]
PERTAIN: list[str]
TZOFFSET: dict[str, int]
def __init__(self, dayfirst: bool = ..., yearfirst: bool = ...) -> None: ...
def jump(self, name: Text) -> bool: ...
def weekday(self, name: Text) -> int | None: ...

View File

@@ -1,5 +1,5 @@
import datetime
from typing import IO, Any, List, Text, Tuple, Union
from typing import IO, Any, Text, Tuple, Union
from ..relativedelta import relativedelta
from ._common import _tzinfo as _tzinfo, enfold as enfold, tzname_in_python2 as tzname_in_python2, tzrangebase as tzrangebase
@@ -87,8 +87,8 @@ class tzical:
def keys(self): ...
def get(self, tzid: Any | None = ...): ...
TZFILES: List[str]
TZPATHS: List[str]
TZFILES: list[str]
TZPATHS: list[str]
def datetime_exists(dt: datetime.datetime, tz: datetime.tzinfo | None = ...) -> bool: ...
def datetime_ambiguous(dt: datetime.datetime, tz: datetime.tzinfo | None = ...) -> bool: ...

View File

@@ -1,5 +1,5 @@
from types import ModuleType
from typing import IO, Any, Callable, Dict, Iterable, List, Sequence, Text
from typing import IO, Any, Callable, Iterable, Sequence, Text
class Error(Exception): ...
@@ -39,12 +39,12 @@ class FlagValues:
def is_gnu_getopt(self) -> bool: ...
IsGnuGetOpt = is_gnu_getopt
# TODO dict type
def FlagDict(self) -> Dict[Any, Any]: ...
def flags_by_module_dict(self) -> Dict[str, List[Flag]]: ...
def FlagDict(self) -> dict[Any, Any]: ...
def flags_by_module_dict(self) -> dict[str, list[Flag]]: ...
FlagsByModuleDict = flags_by_module_dict
def flags_by_module_id_dict(self) -> Dict[int, List[Flag]]: ...
def flags_by_module_id_dict(self) -> dict[int, list[Flag]]: ...
FlagsByModuleIdDict = flags_by_module_id_dict
def key_flags_by_module_dict(self) -> Dict[str, List[Flag]]: ...
def key_flags_by_module_dict(self) -> dict[str, list[Flag]]: ...
KeyFlagsByModuleDict = key_flags_by_module_dict
def find_module_defining_flag(self, flagname: str, default: str = ...) -> str: ...
FindModuleDefiningFlag = find_module_defining_flag
@@ -64,11 +64,11 @@ class FlagValues:
def __contains__(self, name: str) -> bool: ...
has_key = __contains__
def __iter__(self) -> Iterable[str]: ...
def __call__(self, argv: List[str], known_only: bool = ...) -> List[str]: ...
def __call__(self, argv: list[str], known_only: bool = ...) -> list[str]: ...
def reset(self) -> None: ...
Reset = reset
def RegisteredFlags(self) -> List[str]: ...
def flag_values_dict(self) -> Dict[str, Any]: ...
def RegisteredFlags(self) -> list[str]: ...
def flag_values_dict(self) -> dict[str, Any]: ...
FlagValuesDict = flag_values_dict
def __str__(self) -> str: ...
def GetHelp(self, prefix: str = ...) -> str: ...
@@ -77,9 +77,9 @@ class FlagValues:
def main_module_help(self) -> str: ...
MainModuleHelp = main_module_help
def get(self, name: str, default: Any) -> Any: ...
def ShortestUniquePrefixes(self, fl: Dict[str, Flag]) -> Dict[str, str]: ...
def ShortestUniquePrefixes(self, fl: dict[str, Flag]) -> dict[str, str]: ...
def ExtractFilename(self, flagfile_str: str) -> str: ...
def read_flags_from_files(self, argv: List[str], force_gnu: bool = ...) -> List[str]: ...
def read_flags_from_files(self, argv: list[str], force_gnu: bool = ...) -> list[str]: ...
ReadFlagsFromFiles = read_flags_from_files
def flags_into_string(self) -> str: ...
FlagsIntoString = flags_into_string
@@ -138,7 +138,7 @@ class ArgumentSerializer:
class ListSerializer(ArgumentSerializer):
def __init__(self, list_sep: str) -> None: ...
def Serialize(self, value: List[Any]) -> str: ...
def Serialize(self, value: list[Any]) -> str: ...
def register_validator(
flag_name: str, checker: Callable[[Any], bool], message: str = ..., flag_values: FlagValues = ...
@@ -242,12 +242,12 @@ def DEFINE_integer(
) -> None: ...
class EnumParser(ArgumentParser):
def __init__(self, enum_values: List[str]) -> None: ...
def __init__(self, enum_values: list[str]) -> None: ...
def Parse(self, argument: Any) -> Any: ...
class EnumFlag(Flag):
def __init__(
self, name: str, default: str | None, help: str, enum_values: List[str], short_name: str, **args: Any
self, name: str, default: str | None, help: str, enum_values: list[str], short_name: str, **args: Any
) -> None: ...
def DEFINE_enum(
@@ -256,7 +256,7 @@ def DEFINE_enum(
class BaseListParser(ArgumentParser):
def __init__(self, token: str = ..., name: str = ...) -> None: ...
def Parse(self, argument: Any) -> List[Any]: ...
def Parse(self, argument: Any) -> list[Any]: ...
class ListParser(BaseListParser):
def __init__(self) -> None: ...
@@ -264,8 +264,8 @@ class ListParser(BaseListParser):
class WhitespaceSeparatedListParser(BaseListParser):
def __init__(self) -> None: ...
def DEFINE_list(name: str, default: List[str] | None, help: str, flag_values: FlagValues = ..., **args: Any) -> None: ...
def DEFINE_spaceseplist(name: str, default: List[str] | None, help: str, flag_values: FlagValues = ..., **args: Any) -> None: ...
def DEFINE_list(name: str, default: list[str] | None, help: str, flag_values: FlagValues = ..., **args: Any) -> None: ...
def DEFINE_spaceseplist(name: str, default: list[str] | None, help: str, flag_values: FlagValues = ..., **args: Any) -> None: ...
class MultiFlag(Flag):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
@@ -273,14 +273,14 @@ class MultiFlag(Flag):
def Serialize(self) -> str: ...
def DEFINE_multi_string(
name: str, default: str | List[str] | None, help: str, flag_values: FlagValues = ..., **args: Any
name: str, default: str | list[str] | None, help: str, flag_values: FlagValues = ..., **args: Any
) -> None: ...
DEFINE_multistring = DEFINE_multi_string
def DEFINE_multi_integer(
name: str,
default: int | List[int] | None,
default: int | list[int] | None,
help: str,
lower_bound: int = ...,
upper_bound: int = ...,
@@ -292,7 +292,7 @@ DEFINE_multi_int = DEFINE_multi_integer
def DEFINE_multi_float(
name: str,
default: float | List[float] | None,
default: float | list[float] | None,
help: str,
lower_bound: float = ...,
upper_bound: float = ...,

View File

@@ -1,5 +1,5 @@
import datetime
from typing import List, Mapping, Set
from typing import Mapping, Set
class BaseTzInfo(datetime.tzinfo):
zone: str = ...
@@ -32,11 +32,11 @@ UTC: _UTCclass
def timezone(zone: str) -> _UTCclass | _StaticTzInfo | _DstTzInfo: ...
def FixedOffset(offset: int) -> _UTCclass | datetime.tzinfo: ...
all_timezones: List[str]
all_timezones: list[str]
all_timezones_set: Set[str]
common_timezones: List[str]
common_timezones: list[str]
common_timezones_set: Set[str]
country_timezones: Mapping[str, List[str]]
country_timezones: Mapping[str, list[str]]
country_names: Mapping[str, str]
ZERO: datetime.timedelta
HOUR: datetime.timedelta

View File

@@ -1,6 +1,6 @@
from datetime import datetime
from enum import Enum
from typing import Any, List
from typing import Any
from ..vmodl.query import PropertyCollector
from .event import EventManager
@@ -44,15 +44,15 @@ class PerformanceManager:
def __getattr__(self, name: str) -> Any: ... # incomplete
class QuerySpec:
entity: ManagedEntity
metricId: List[PerformanceManager.MetricId]
metricId: list[PerformanceManager.MetricId]
intervalId: int
maxSample: int
startTime: datetime
def __getattr__(self, name: str) -> Any: ... # incomplete
class EntityMetricBase:
entity: ManagedEntity
def QueryPerfCounterByLevel(self, collection_level: int) -> List[PerformanceManager.PerfCounterInfo]: ...
def QueryPerf(self, querySpec: List[PerformanceManager.QuerySpec]) -> List[PerformanceManager.EntityMetricBase]: ...
def QueryPerfCounterByLevel(self, collection_level: int) -> list[PerformanceManager.PerfCounterInfo]: ...
def QueryPerf(self, querySpec: list[PerformanceManager.QuerySpec]) -> list[PerformanceManager.EntityMetricBase]: ...
def __getattr__(self, name: str) -> Any: ... # incomplete
class ClusterComputeResource(ManagedEntity): ...

View File

@@ -1,5 +1,5 @@
from datetime import datetime
from typing import Any, List
from typing import Any
def __getattr__(name: str) -> Any: ... # incomplete
@@ -13,4 +13,4 @@ class EventFilterSpec:
class EventManager:
latestEvent: Event
def QueryEvents(self, filer: EventFilterSpec) -> List[Event]: ...
def QueryEvents(self, filer: EventFilterSpec) -> list[Event]: ...

View File

@@ -1,9 +1,9 @@
from typing import Any, List
from typing import Any
def __getattr__(name: str) -> Any: ... # incomplete
class OptionManager:
def QueryOptions(self, name: str) -> List[OptionValue]: ...
def QueryOptions(self, name: str) -> list[OptionValue]: ...
class OptionValue:
value: Any

View File

@@ -1,4 +1,4 @@
from typing import Any, List, Type
from typing import Any, Type
from pyVmomi.vim import ManagedEntity
@@ -8,8 +8,8 @@ class ContainerView:
def Destroy(self) -> None: ...
class ViewManager:
# Doc says the `type` parameter of CreateContainerView is a `List[str]`,
# but in practice it seems to be `List[Type[ManagedEntity]]`
# Doc says the `type` parameter of CreateContainerView is a `list[str]`,
# 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, List, Type
from typing import Any, Type
from pyVmomi.vim import ManagedEntity
from pyVmomi.vim.view import ContainerView
@@ -6,10 +6,10 @@ 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]
pathSet: List[str]
pathSet: list[str]
class TraversalSpec:
def __init__(
self, *, path: str = ..., skip: bool = ..., type: Type[ContainerView] = ..., **kwargs: Any # incomplete
@@ -23,35 +23,35 @@ class PropertyCollector:
maxObjects: int
class ObjectSpec:
def __init__(
self, *, skip: bool = ..., selectSet: List[PropertyCollector.TraversalSpec] = ..., obj: Any = ...
self, *, skip: bool = ..., selectSet: list[PropertyCollector.TraversalSpec] = ..., obj: Any = ...
) -> None: ...
skip: bool
selectSet: List[PropertyCollector.TraversalSpec]
selectSet: list[PropertyCollector.TraversalSpec]
obj: Any
class FilterSpec:
def __init__(
self,
*,
propSet: List[PropertyCollector.PropertySpec] = ...,
objectSet: List[PropertyCollector.ObjectSpec] = ...,
propSet: list[PropertyCollector.PropertySpec] = ...,
objectSet: list[PropertyCollector.ObjectSpec] = ...,
**kwargs: Any, # incomplete
) -> None: ...
propSet: List[PropertyCollector.PropertySpec]
objectSet: List[PropertyCollector.ObjectSpec]
propSet: list[PropertyCollector.PropertySpec]
objectSet: list[PropertyCollector.ObjectSpec]
def __getattr__(self, name: str) -> Any: ... # incomplete
class ObjectContent:
def __init__(
self, *, obj: ManagedEntity = ..., propSet: List[DynamicProperty] = ..., **kwargs: Any # incomplete
self, *, obj: ManagedEntity = ..., propSet: list[DynamicProperty] = ..., **kwargs: Any # incomplete
) -> None: ...
obj: ManagedEntity
propSet: List[DynamicProperty]
propSet: list[DynamicProperty]
def __getattr__(self, name: str) -> Any: ... # incomplete
class RetrieveResult:
def __init__(self, *, objects: List[PropertyCollector.ObjectContent] = ..., token: str | None = ...) -> None: ...
objects: List[PropertyCollector.ObjectContent]
def __init__(self, *, objects: list[PropertyCollector.ObjectContent] = ..., token: str | None = ...) -> None: ...
objects: list[PropertyCollector.ObjectContent]
token: str | None
def RetrievePropertiesEx(
self, specSet: List[PropertyCollector.FilterSpec], options: PropertyCollector.RetrieveOptions
self, specSet: list[PropertyCollector.FilterSpec], options: PropertyCollector.RetrieveOptions
) -> PropertyCollector.RetrieveResult: ...
def ContinueRetrievePropertiesEx(self, token: str) -> PropertyCollector.RetrieveResult: ...
def __getattr__(self, name: str) -> Any: ... # incomplete

View File

@@ -1,22 +1,5 @@
from datetime import datetime, timedelta
from typing import (
Any,
Callable,
Dict,
Generic,
Iterable,
Iterator,
List,
Mapping,
Sequence,
Set,
Text,
Tuple,
Type,
TypeVar,
Union,
overload,
)
from typing import Any, Callable, Generic, Iterable, Iterator, Mapping, Sequence, Set, Text, Tuple, Type, TypeVar, Union, overload
from typing_extensions import Literal
from .connection import ConnectionPool
@@ -392,11 +375,11 @@ class Redis(Generic[_StrType]):
def pubsub(self, shard_hint: Any = ..., ignore_subscribe_messages: bool = ...) -> PubSub: ...
def execute_command(self, *args, **options): ...
def parse_response(self, connection, command_name, **options): ...
def acl_cat(self, category: Text | None = ...) -> List[str]: ...
def acl_cat(self, category: Text | None = ...) -> list[str]: ...
def acl_deluser(self, username: Text) -> int: ...
def acl_genpass(self) -> Text: ...
def acl_getuser(self, username: Text) -> Any | None: ...
def acl_list(self) -> List[Text]: ...
def acl_list(self) -> list[Text]: ...
def acl_load(self) -> bool: ...
def acl_setuser(
self,
@@ -412,13 +395,13 @@ class Redis(Generic[_StrType]):
reset_keys: bool = ...,
reset_passwords: bool = ...,
) -> bool: ...
def acl_users(self) -> List[Text]: ...
def acl_users(self) -> list[Text]: ...
def acl_whoami(self) -> Text: ...
def bgrewriteaof(self): ...
def bgsave(self): ...
def client_id(self) -> int: ...
def client_kill(self, address: Text) -> bool: ...
def client_list(self) -> List[Dict[str, str]]: ...
def client_list(self) -> list[dict[str, str]]: ...
def client_getname(self) -> str | None: ...
def client_setname(self, name: Text) -> bool: ...
def readwrite(self) -> bool: ...
@@ -472,8 +455,8 @@ class Redis(Generic[_StrType]):
def incr(self, name: _Key, amount: int = ...) -> int: ...
def incrby(self, name: _Key, amount: int = ...) -> int: ...
def incrbyfloat(self, name: _Key, amount: float = ...) -> float: ...
def keys(self, pattern: _Key = ...) -> List[_StrType]: ...
def mget(self, keys: _Key | Iterable[_Key], *args: _Key) -> List[_StrType | None]: ...
def keys(self, pattern: _Key = ...) -> list[_StrType]: ...
def mget(self, keys: _Key | Iterable[_Key], *args: _Key) -> list[_StrType | None]: ...
def mset(self, mapping: Mapping[_Key, _Value]) -> Literal[True]: ...
def msetnx(self, mapping: Mapping[_Key, _Value]) -> bool: ...
def move(self, name: _Key, db: int) -> bool: ...
@@ -525,7 +508,7 @@ class Redis(Generic[_StrType]):
def lpop(self, name): ...
def lpush(self, name: _Value, *values: _Value) -> int: ...
def lpushx(self, name, value): ...
def lrange(self, name: _Key, start: int, end: int) -> List[_StrType]: ...
def lrange(self, name: _Key, start: int, end: int) -> list[_StrType]: ...
def lrem(self, name: _Key, count: int, value: _Value) -> int: ...
def lset(self, name: _Key, index: int, value: _Value) -> bool: ...
def ltrim(self, name: _Key, start: int, end: int) -> bool: ...
@@ -545,7 +528,7 @@ class Redis(Generic[_StrType]):
alpha: bool = ...,
store: None = ...,
groups: bool = ...,
) -> List[_StrType]: ...
) -> list[_StrType]: ...
@overload
def sort(
self,
@@ -573,13 +556,13 @@ class Redis(Generic[_StrType]):
store: _Key,
groups: bool = ...,
) -> int: ...
def scan(self, cursor: int = ..., match: _Key | None = ..., count: int | None = ...) -> Tuple[int, List[_StrType]]: ...
def scan(self, cursor: int = ..., match: _Key | None = ..., count: int | None = ...) -> Tuple[int, list[_StrType]]: ...
def scan_iter(self, match: Text | None = ..., count: int | None = ...) -> Iterator[_StrType]: ...
def sscan(self, name: _Key, cursor: int = ..., match: Text = ..., count: int = ...) -> Tuple[int, List[_StrType]]: ...
def sscan(self, name: _Key, cursor: int = ..., match: Text = ..., count: int = ...) -> Tuple[int, list[_StrType]]: ...
def sscan_iter(self, name, match=..., count=...): ...
def hscan(
self, name: _Key, cursor: int = ..., match: Text = ..., count: int = ...
) -> Tuple[int, Dict[_StrType, _StrType]]: ...
) -> Tuple[int, dict[_StrType, _StrType]]: ...
def hscan_iter(self, name, match=..., count=...): ...
def zscan(self, name, cursor=..., match=..., count=..., score_cast_func=...): ...
def zscan_iter(self, name, match=..., count=..., score_cast_func=...): ...
@@ -595,11 +578,11 @@ class Redis(Generic[_StrType]):
@overload
def spop(self, name: _Key, count: None = ...) -> _Value | None: ...
@overload
def spop(self, name: _Key, count: int) -> List[_Value]: ...
def spop(self, name: _Key, count: int) -> list[_Value]: ...
@overload
def srandmember(self, name: _Key, number: None = ...) -> _Value | None: ...
@overload
def srandmember(self, name: _Key, number: int) -> List[_Value]: ...
def srandmember(self, name: _Key, number: int) -> list[_Value]: ...
def srem(self, name: _Key, *values: _Value) -> int: ...
def sunion(self, keys: _Key | Iterable[_Key], *args: _Key) -> Set[_Value]: ...
def sunionstore(self, dest: _Key, keys: _Key | Iterable[_Key], *args: _Key) -> int: ...
@@ -632,8 +615,8 @@ class Redis(Generic[_StrType]):
def zincrby(self, name: _Key, amount: float, value: _Value) -> float: ...
def zinterstore(self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] = ...) -> int: ...
def zlexcount(self, name: _Key, min: _Value, max: _Value) -> int: ...
def zpopmax(self, name: _Key, count: int | None = ...) -> List[_StrType]: ...
def zpopmin(self, name: _Key, count: int | None = ...) -> List[_StrType]: ...
def zpopmax(self, name: _Key, count: int | None = ...) -> list[_StrType]: ...
def zpopmin(self, name: _Key, count: int | None = ...) -> list[_StrType]: ...
@overload
def bzpopmax(self, keys: _Key | Iterable[_Key], timeout: Literal[0] = ...) -> Tuple[_StrType, _StrType, float]: ...
@overload
@@ -652,7 +635,7 @@ class Redis(Generic[_StrType]):
*,
withscores: Literal[True],
score_cast_func: Callable[[float], _ScoreCastFuncReturn] = ...,
) -> List[Tuple[_StrType, _ScoreCastFuncReturn]]: ...
) -> list[Tuple[_StrType, _ScoreCastFuncReturn]]: ...
@overload
def zrange(
self,
@@ -662,10 +645,10 @@ class Redis(Generic[_StrType]):
desc: bool = ...,
withscores: bool = ...,
score_cast_func: Callable[[Any], Any] = ...,
) -> List[_StrType]: ...
) -> list[_StrType]: ...
def zrangebylex(
self, name: _Key, min: _Value, max: _Value, start: int | None = ..., num: int | None = ...
) -> List[_StrType]: ...
) -> list[_StrType]: ...
@overload
def zrangebyscore(
self,
@@ -677,7 +660,7 @@ class Redis(Generic[_StrType]):
*,
withscores: Literal[True],
score_cast_func: Callable[[float], _ScoreCastFuncReturn] = ...,
) -> List[Tuple[_StrType, _ScoreCastFuncReturn]]: ...
) -> list[Tuple[_StrType, _ScoreCastFuncReturn]]: ...
@overload
def zrangebyscore(
self,
@@ -688,7 +671,7 @@ class Redis(Generic[_StrType]):
num: int | None = ...,
withscores: bool = ...,
score_cast_func: Callable[[Any], Any] = ...,
) -> List[_StrType]: ...
) -> list[_StrType]: ...
def zrank(self, name: _Key, value: _Value) -> int | None: ...
def zrem(self, name: _Key, *values: _Value) -> int: ...
def zremrangebylex(self, name: _Key, min: _Value, max: _Value) -> int: ...
@@ -704,7 +687,7 @@ class Redis(Generic[_StrType]):
*,
withscores: Literal[True],
score_cast_func: Callable[[float], _ScoreCastFuncReturn] = ...,
) -> List[Tuple[_StrType, _ScoreCastFuncReturn]]: ...
) -> list[Tuple[_StrType, _ScoreCastFuncReturn]]: ...
@overload
def zrevrange(
self,
@@ -714,7 +697,7 @@ class Redis(Generic[_StrType]):
desc: bool = ...,
withscores: bool = ...,
score_cast_func: Callable[[Any], Any] = ...,
) -> List[_StrType]: ...
) -> list[_StrType]: ...
@overload
def zrevrangebyscore(
self,
@@ -726,7 +709,7 @@ class Redis(Generic[_StrType]):
*,
withscores: Literal[True],
score_cast_func: Callable[[float], _ScoreCastFuncReturn] = ...,
) -> List[Tuple[_StrType, _ScoreCastFuncReturn]]: ...
) -> list[Tuple[_StrType, _ScoreCastFuncReturn]]: ...
@overload
def zrevrangebyscore(
self,
@@ -737,10 +720,10 @@ class Redis(Generic[_StrType]):
num: int | None = ...,
withscores: bool = ...,
score_cast_func: Callable[[Any], Any] = ...,
) -> List[_StrType]: ...
) -> list[_StrType]: ...
def zrevrangebylex(
self, name: _Key, min: _Value, max: _Value, start: int | None = ..., num: int | None = ...
) -> List[_StrType]: ...
) -> list[_StrType]: ...
def zrevrank(self, name: _Key, value: _Value) -> int | None: ...
def zscore(self, name: _Key, value: _Value) -> float | None: ...
def zunionstore(self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] = ...) -> int: ...
@@ -750,10 +733,10 @@ class Redis(Generic[_StrType]):
def hdel(self, name: _Key, *keys: _Key) -> int: ...
def hexists(self, name: _Key, key: _Key) -> bool: ...
def hget(self, name: _Key, key: _Key) -> _StrType | None: ...
def hgetall(self, name: _Key) -> Dict[_StrType, _StrType]: ...
def hgetall(self, name: _Key) -> dict[_StrType, _StrType]: ...
def hincrby(self, name: _Key, key: _Key, amount: int = ...) -> int: ...
def hincrbyfloat(self, name: _Key, key: _Key, amount: float = ...) -> float: ...
def hkeys(self, name: _Key) -> List[_StrType]: ...
def hkeys(self, name: _Key) -> list[_StrType]: ...
def hlen(self, name: _Key) -> int: ...
@overload
def hset(self, name: _Key, key: _Key, value: _Value, mapping: Mapping[_Key, _Value] | None = ...) -> int: ...
@@ -763,8 +746,8 @@ class Redis(Generic[_StrType]):
def hset(self, name: _Key, *, mapping: Mapping[_Key, _Value]) -> int: ...
def hsetnx(self, name: _Key, key: _Key, value: _Value) -> int: ...
def hmset(self, name: _Key, mapping: Mapping[_Key, _Value]) -> bool: ...
def hmget(self, name: _Key, keys: _Key | Iterable[_Key], *args: _Key) -> List[_StrType | None]: ...
def hvals(self, name: _Key) -> List[_StrType]: ...
def hmget(self, name: _Key, keys: _Key | Iterable[_Key], *args: _Key) -> list[_StrType | None]: ...
def hvals(self, name: _Key) -> list[_StrType]: ...
def publish(self, channel: _Key, message: _Key) -> int: ...
def eval(self, script, numkeys, *keys_and_args): ...
def evalsha(self, sha, numkeys, *keys_and_args): ...
@@ -773,8 +756,8 @@ class Redis(Generic[_StrType]):
def script_kill(self): ...
def script_load(self, script): ...
def register_script(self, script: Text | _StrType) -> Script: ...
def pubsub_channels(self, pattern: _Key = ...) -> List[Text]: ...
def pubsub_numsub(self, *args: _Key) -> List[Tuple[Text, int]]: ...
def pubsub_channels(self, pattern: _Key = ...) -> list[Text]: ...
def pubsub_numsub(self, *args: _Key) -> list[Tuple[Text, int]]: ...
def pubsub_numpat(self) -> int: ...
def monitor(self) -> Monitor: ...
def cluster(self, cluster_arg: str, *args: Any) -> Any: ...
@@ -813,8 +796,8 @@ class PubSub:
def subscribe(self, *args: _Key, **kwargs: Callable[[Any], None]) -> None: ...
def unsubscribe(self, *args: _Key) -> None: ...
def listen(self): ...
def get_message(self, ignore_subscribe_messages: bool = ..., timeout: float = ...) -> Dict[str, Any] | None: ...
def handle_message(self, response, ignore_subscribe_messages: bool = ...) -> Dict[str, Any] | None: ...
def get_message(self, ignore_subscribe_messages: bool = ..., timeout: float = ...) -> dict[str, Any] | None: ...
def handle_message(self, response, ignore_subscribe_messages: bool = ...) -> dict[str, Any] | None: ...
def run_in_thread(self, sleep_time=...): ...
def ping(self, message: _Value | None = ...) -> None: ...
@@ -845,7 +828,7 @@ class Pipeline(Redis[_StrType], Generic[_StrType]):
def annotate_exception(self, exception, number, command): ...
def parse_response(self, connection, command_name, **options): ...
def load_scripts(self): ...
def execute(self, raise_on_error: bool = ...) -> List[Any]: ...
def execute(self, raise_on_error: bool = ...) -> list[Any]: ...
def watch(self, *names: _Key) -> bool: ...
def unwatch(self) -> bool: ...
# in the Redis implementation, the following methods are inherited from client.
@@ -1150,5 +1133,5 @@ class Monitor(object):
def __init__(self, connection_pool) -> None: ...
def __enter__(self) -> Monitor: ...
def __exit__(self, *args: Any) -> None: ...
def next_command(self) -> Dict[Text, Any]: ...
def listen(self) -> Iterable[Dict[Text, Any]]: ...
def next_command(self) -> dict[Text, Any]: ...
def listen(self) -> Iterable[dict[Text, Any]]: ...

Some files were not shown because too many files have changed in this diff Show More