mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-04-07 08:24:04 +08:00
Use typing_extensions.Self instead of _typeshed.Self (#9702)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import datetime
|
||||
from _typeshed import Self
|
||||
from collections.abc import Iterable
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Self
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
@@ -33,9 +33,9 @@ class DateTimeRange:
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
def __add__(self, other: datetime.timedelta) -> DateTimeRange: ...
|
||||
def __iadd__(self: Self, other: datetime.timedelta) -> Self: ...
|
||||
def __iadd__(self, other: datetime.timedelta) -> Self: ...
|
||||
def __sub__(self, other: datetime.timedelta) -> DateTimeRange: ...
|
||||
def __isub__(self: Self, other: datetime.timedelta) -> Self: ...
|
||||
def __isub__(self, other: datetime.timedelta) -> Self: ...
|
||||
def __contains__(self, x: datetime.timedelta | datetime.datetime | DateTimeRange | str) -> bool: ...
|
||||
@property
|
||||
def start_datetime(self) -> datetime.datetime: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Mapping
|
||||
from fractions import Fraction
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@@ -14,7 +14,7 @@ def make_string_uc(seq: str | list[int]) -> str: ...
|
||||
def get_gps_coords(tags: Mapping[str, Any]) -> tuple[float, float]: ...
|
||||
|
||||
class Ratio(Fraction):
|
||||
def __new__(cls: type[Self], numerator: int = ..., denominator: int | None = ...) -> Self: ...
|
||||
def __new__(cls, numerator: int = ..., denominator: int | None = ...) -> Self: ...
|
||||
@property
|
||||
def num(self) -> int: ...
|
||||
@property
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
|
||||
from typing import Any, NoReturn, overload
|
||||
from typing_extensions import Literal
|
||||
from typing_extensions import Literal, Self
|
||||
|
||||
import numpy
|
||||
from _cffi_backend import _CDataBase
|
||||
@@ -80,7 +79,7 @@ class Client:
|
||||
servername: str | None = ...,
|
||||
session_id: str | None = ...,
|
||||
) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: object) -> None: ...
|
||||
@property
|
||||
def name(self) -> str: ...
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable, Mapping, Sequence
|
||||
from typing import Any, ClassVar, Protocol
|
||||
from typing_extensions import Literal
|
||||
from typing_extensions import Literal, Self
|
||||
from xml.etree.ElementTree import Element
|
||||
|
||||
from .blockparser import BlockParser
|
||||
@@ -45,7 +44,7 @@ class Markdown:
|
||||
def registerExtensions(self, extensions: Sequence[Extension | str], configs: Mapping[str, Mapping[str, Any]]) -> Markdown: ...
|
||||
def build_extension(self, ext_name: str, configs: Mapping[str, str]) -> Extension: ...
|
||||
def registerExtension(self, extension: Extension) -> Markdown: ...
|
||||
def reset(self: Self) -> Self: ...
|
||||
def reset(self) -> Self: ...
|
||||
def set_output_format(self, format: Literal["xhtml", "html"]) -> Markdown: ...
|
||||
def is_block_level(self, tag: str) -> bool: ...
|
||||
def convert(self, source: str) -> str: ...
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from _typeshed import Incomplete, Self, SupportsRead, SupportsWrite
|
||||
from _typeshed import Incomplete, SupportsRead, SupportsWrite
|
||||
from collections.abc import Callable, Iterable, Iterator, MutableMapping, Sequence
|
||||
from enum import IntEnum
|
||||
from pathlib import Path
|
||||
from typing import Any, ClassVar, Protocol, SupportsBytes
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
from PIL.PyAccess import PyAccess
|
||||
|
||||
@@ -171,7 +171,7 @@ class Image:
|
||||
def height(self) -> int: ...
|
||||
@property
|
||||
def size(self) -> tuple[int, int]: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: object) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, NoReturn
|
||||
from typing_extensions import Self
|
||||
|
||||
from .Image import Image
|
||||
|
||||
@@ -40,7 +41,7 @@ class Parser:
|
||||
def reset(self) -> None: ...
|
||||
decode: Any
|
||||
def feed(self, data) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: object) -> None: ...
|
||||
def close(self) -> Image: ...
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Iterable, Sequence
|
||||
from typing import Any
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
from .Image import Image
|
||||
|
||||
@@ -122,14 +122,14 @@ class Color3DLUT(MultibandFilter):
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def generate(
|
||||
cls: type[Self],
|
||||
cls,
|
||||
size: int | tuple[int, int, int],
|
||||
callback: Callable[[float, float, float], Iterable[float]],
|
||||
channels: int = ...,
|
||||
target_mode: str | None = ...,
|
||||
) -> Self: ...
|
||||
def transform(
|
||||
self: Self,
|
||||
self,
|
||||
callback: Callable[..., Iterable[float]],
|
||||
with_normals: bool = ...,
|
||||
channels: Literal[3, 4] | None = ...,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Mapping
|
||||
from socket import socket as _socket
|
||||
from typing import Any, AnyStr, Generic, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
from .charset import charset_by_id as charset_by_id, charset_by_name as charset_by_name
|
||||
from .constants import CLIENT as CLIENT, COMMAND as COMMAND, FIELD_TYPE as FIELD_TYPE, SERVER_STATUS as SERVER_STATUS
|
||||
@@ -197,7 +198,7 @@ class Connection(Generic[_C]):
|
||||
def get_proto_info(self): ...
|
||||
def get_server_info(self): ...
|
||||
def show_warnings(self): ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *exc_info: object) -> None: ...
|
||||
Warning: Any
|
||||
Error: Any
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
from .connections import Connection
|
||||
|
||||
@@ -24,7 +24,7 @@ class Cursor:
|
||||
def executemany(self, query: str, args: Iterable[object]) -> int | None: ...
|
||||
def callproc(self, procname: str, args: Iterable[Any] = ...) -> Any: ...
|
||||
def scroll(self, value: int, mode: str = ...) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *exc_info: object) -> None: ...
|
||||
# Methods returning result tuples are below.
|
||||
def fetchone(self) -> tuple[Any, ...] | None: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
class _TokenType(tuple[str, ...]):
|
||||
parent: _TokenType | None
|
||||
@@ -8,8 +8,8 @@ class _TokenType(tuple[str, ...]):
|
||||
subtypes: set[_TokenType]
|
||||
def __contains__(self, val: _TokenType) -> bool: ... # type: ignore[override]
|
||||
def __getattr__(self, name: str) -> _TokenType: ...
|
||||
def __copy__(self: Self) -> Self: ...
|
||||
def __deepcopy__(self: Self, memo: Any) -> Self: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
def __deepcopy__(self, memo: Any) -> Self: ...
|
||||
|
||||
Token: _TokenType
|
||||
Text: _TokenType
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed.dbapi import DBAPIConnection
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Callable, Mapping
|
||||
from types import TracebackType
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Concatenate, ParamSpec, TypeAlias
|
||||
from typing_extensions import Concatenate, ParamSpec, Self, TypeAlias
|
||||
|
||||
from ..log import Identified, _EchoFlag, echo_property
|
||||
from ..pool import Pool
|
||||
@@ -40,7 +40,7 @@ class Connection(Connectable):
|
||||
_allow_revalidate: bool = ...,
|
||||
) -> None: ...
|
||||
def schema_for_object(self, obj) -> str | None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Self
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
from .base import _Executable
|
||||
from .cursor import CursorResult
|
||||
@@ -11,7 +11,7 @@ from .url import URL
|
||||
class MockConnection(Connectable):
|
||||
def __init__(self, dialect: Dialect, execute) -> None: ...
|
||||
@property
|
||||
def engine(self: Self) -> Self: ... # type: ignore[override]
|
||||
def engine(self) -> Self: ... # type: ignore[override]
|
||||
@property
|
||||
def dialect(self) -> Dialect: ...
|
||||
@property
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator, KeysView
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..sql.base import InPlaceGenerative
|
||||
from .row import Row
|
||||
@@ -38,8 +39,8 @@ class _WithKeys:
|
||||
class Result(_WithKeys, ResultInternal):
|
||||
def __init__(self, cursor_metadata) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def yield_per(self: Self, num: int) -> Self: ...
|
||||
def unique(self: Self, strategy: Incomplete | None = ...) -> Self: ...
|
||||
def yield_per(self, num: int) -> Self: ...
|
||||
def unique(self, strategy: Incomplete | None = ...) -> Self: ...
|
||||
def columns(self, *col_expressions): ...
|
||||
def scalars(self, index: int = ...) -> ScalarResult: ...
|
||||
def mappings(self) -> MappingResult: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Self, SupportsItems
|
||||
from _typeshed import SupportsItems
|
||||
from collections.abc import Iterable, Mapping, Sequence
|
||||
from typing import Any, NamedTuple
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
from ..util import immutabledict
|
||||
from .interfaces import Dialect
|
||||
@@ -31,7 +31,7 @@ class URL(_URLTuple):
|
||||
query: _Query | None = ...,
|
||||
) -> URL: ...
|
||||
def set(
|
||||
self: Self,
|
||||
self,
|
||||
drivername: str | None = ...,
|
||||
username: str | None = ...,
|
||||
password: str | object | None = ...,
|
||||
@@ -40,16 +40,16 @@ class URL(_URLTuple):
|
||||
database: str | None = ...,
|
||||
query: _Query | None = ...,
|
||||
) -> Self: ...
|
||||
def update_query_string(self: Self, query_string: str, append: bool = ...) -> Self: ...
|
||||
def update_query_pairs(self: Self, key_value_pairs: Iterable[tuple[str, str]], append: bool = ...) -> Self: ...
|
||||
def update_query_dict(self: Self, query_parameters: SupportsItems[str, str | Sequence[str]], append: bool = ...) -> Self: ...
|
||||
def update_query_string(self, query_string: str, append: bool = ...) -> Self: ...
|
||||
def update_query_pairs(self, key_value_pairs: Iterable[tuple[str, str]], append: bool = ...) -> Self: ...
|
||||
def update_query_dict(self, query_parameters: SupportsItems[str, str | Sequence[str]], append: bool = ...) -> Self: ...
|
||||
def difference_update_query(self, names: Iterable[str]) -> URL: ...
|
||||
@property
|
||||
def normalized_query(self) -> immutabledict[str, tuple[str, ...]]: ...
|
||||
def __to_string__(self, hide_password: bool = ...) -> str: ...
|
||||
def render_as_string(self, hide_password: bool = ...) -> str: ...
|
||||
def __copy__(self: Self) -> Self: ...
|
||||
def __deepcopy__(self: Self, memo: object) -> Self: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
def __deepcopy__(self, memo: object) -> Self: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
def connection_memoize(key: str) -> Callable[..., Any]: ...
|
||||
|
||||
class TransactionalContext:
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
from ...util import memoized_property
|
||||
from .base import ReversibleProxy, StartableContext
|
||||
@@ -53,7 +54,7 @@ class AsyncSession(ReversibleProxy):
|
||||
async def close(self): ...
|
||||
@classmethod
|
||||
async def close_all(cls): ...
|
||||
async def __aenter__(self: Self) -> Self: ...
|
||||
async def __aenter__(self) -> Self: ...
|
||||
async def __aexit__(self, type_, value, traceback) -> None: ...
|
||||
# proxied from Session
|
||||
identity_map: Any
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from logging import Logger
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
_ClsT = TypeVar("_ClsT", bound=type)
|
||||
_EchoFlag: TypeAlias = bool | Literal["debug"] | None
|
||||
@@ -33,7 +32,7 @@ def instance_logger(instance: Identified, echoflag: _EchoFlag = ...) -> None: ..
|
||||
class echo_property:
|
||||
__doc__: str
|
||||
@overload
|
||||
def __get__(self: Self, instance: None, owner: object) -> Self: ...
|
||||
def __get__(self, instance: None, owner: object) -> Self: ...
|
||||
@overload
|
||||
def __get__(self, instance: Identified, owner: object) -> _EchoFlag: ...
|
||||
def __set__(self, instance: Identified, value: _EchoFlag) -> None: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterator
|
||||
from typing import Any, Generic, TypeVar
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
from ..sql.annotation import SupportsCloneAnnotations
|
||||
from ..sql.base import Executable
|
||||
@@ -30,74 +30,69 @@ class Query(_SelectFromElements, SupportsCloneAnnotations, HasPrefixes, HasSuffi
|
||||
@property
|
||||
def selectable(self): ...
|
||||
def __clause_element__(self): ...
|
||||
def only_return_tuples(self: Self, value) -> Self: ...
|
||||
def only_return_tuples(self, value) -> Self: ...
|
||||
@property
|
||||
def is_single_entity(self): ...
|
||||
def enable_eagerloads(self: Self, value) -> Self: ...
|
||||
def enable_eagerloads(self, value) -> Self: ...
|
||||
def with_labels(self): ...
|
||||
apply_labels: Any
|
||||
@property
|
||||
def get_label_style(self): ...
|
||||
def set_label_style(self, style): ...
|
||||
def enable_assertions(self: Self, value) -> Self: ...
|
||||
def enable_assertions(self, value) -> Self: ...
|
||||
@property
|
||||
def whereclause(self): ...
|
||||
def with_polymorphic(
|
||||
self: Self, cls_or_mappers, selectable: Incomplete | None = ..., polymorphic_on: Incomplete | None = ...
|
||||
self, cls_or_mappers, selectable: Incomplete | None = ..., polymorphic_on: Incomplete | None = ...
|
||||
) -> Self: ...
|
||||
def yield_per(self: Self, count) -> Self: ...
|
||||
def yield_per(self, count) -> Self: ...
|
||||
def get(self, ident): ...
|
||||
@property
|
||||
def lazy_loaded_from(self): ...
|
||||
def correlate(self: Self, *fromclauses) -> Self: ...
|
||||
def autoflush(self: Self, setting) -> Self: ...
|
||||
def populate_existing(self: Self) -> Self: ...
|
||||
def correlate(self, *fromclauses) -> Self: ...
|
||||
def autoflush(self, setting) -> Self: ...
|
||||
def populate_existing(self) -> Self: ...
|
||||
def with_parent(self, instance, property: Incomplete | None = ..., from_entity: Incomplete | None = ...): ...
|
||||
def add_entity(self: Self, entity, alias: Incomplete | None = ...) -> Self: ...
|
||||
def with_session(self: Self, session) -> Self: ...
|
||||
def add_entity(self, entity, alias: Incomplete | None = ...) -> Self: ...
|
||||
def with_session(self, session) -> Self: ...
|
||||
def from_self(self, *entities): ...
|
||||
def values(self, *columns): ...
|
||||
def value(self, column): ...
|
||||
def with_entities(self: Self, *entities) -> Self: ...
|
||||
def add_columns(self: Self, *column) -> Self: ...
|
||||
def with_entities(self, *entities) -> Self: ...
|
||||
def add_columns(self, *column) -> Self: ...
|
||||
def add_column(self, column): ...
|
||||
def options(self: Self, *args) -> Self: ...
|
||||
def options(self, *args) -> Self: ...
|
||||
def with_transformation(self, fn): ...
|
||||
def get_execution_options(self): ...
|
||||
def execution_options(self: Self, **kwargs) -> Self: ...
|
||||
def execution_options(self, **kwargs) -> Self: ...
|
||||
def with_for_update(
|
||||
self: Self,
|
||||
read: bool = ...,
|
||||
nowait: bool = ...,
|
||||
of: Incomplete | None = ...,
|
||||
skip_locked: bool = ...,
|
||||
key_share: bool = ...,
|
||||
self, read: bool = ..., nowait: bool = ..., of: Incomplete | None = ..., skip_locked: bool = ..., key_share: bool = ...
|
||||
) -> Self: ...
|
||||
def params(self: Self, *args, **kwargs) -> Self: ...
|
||||
def params(self, *args, **kwargs) -> Self: ...
|
||||
def where(self, *criterion): ...
|
||||
def filter(self: Self, *criterion) -> Self: ...
|
||||
def filter_by(self: Self, **kwargs) -> Self: ...
|
||||
def order_by(self: Self, *clauses) -> Self: ...
|
||||
def group_by(self: Self, *clauses) -> Self: ...
|
||||
def having(self: Self, criterion) -> Self: ...
|
||||
def filter(self, *criterion) -> Self: ...
|
||||
def filter_by(self, **kwargs) -> Self: ...
|
||||
def order_by(self, *clauses) -> Self: ...
|
||||
def group_by(self, *clauses) -> Self: ...
|
||||
def having(self, criterion) -> Self: ...
|
||||
def union(self, *q): ...
|
||||
def union_all(self, *q): ...
|
||||
def intersect(self, *q): ...
|
||||
def intersect_all(self, *q): ...
|
||||
def except_(self, *q): ...
|
||||
def except_all(self, *q): ...
|
||||
def join(self: Self, target, *props, **kwargs) -> Self: ...
|
||||
def outerjoin(self: Self, target, *props, **kwargs) -> Self: ...
|
||||
def reset_joinpoint(self: Self) -> Self: ...
|
||||
def select_from(self: Self, *from_obj) -> Self: ...
|
||||
def select_entity_from(self: Self, from_obj) -> Self: ...
|
||||
def join(self, target, *props, **kwargs) -> Self: ...
|
||||
def outerjoin(self, target, *props, **kwargs) -> Self: ...
|
||||
def reset_joinpoint(self) -> Self: ...
|
||||
def select_from(self, *from_obj) -> Self: ...
|
||||
def select_entity_from(self, from_obj) -> Self: ...
|
||||
def __getitem__(self, item): ...
|
||||
def slice(self: Self, start, stop) -> Self: ...
|
||||
def limit(self: Self, limit) -> Self: ...
|
||||
def offset(self: Self, offset) -> Self: ...
|
||||
def distinct(self: Self, *expr) -> Self: ...
|
||||
def slice(self, start, stop) -> Self: ...
|
||||
def limit(self, limit) -> Self: ...
|
||||
def offset(self, offset) -> Self: ...
|
||||
def distinct(self, *expr) -> Self: ...
|
||||
def all(self) -> list[_T]: ...
|
||||
def from_statement(self: Self, statement) -> Self: ...
|
||||
def from_statement(self, statement) -> Self: ...
|
||||
def first(self) -> _T | None: ...
|
||||
def one_or_none(self): ...
|
||||
def one(self): ...
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..engine.base import Connection
|
||||
from ..engine.result import Result
|
||||
@@ -105,7 +106,7 @@ class Session(_SessionClassMethods):
|
||||
query_cls: Incomplete | None = ...,
|
||||
) -> None: ...
|
||||
connection_callable: Any
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, type_, value, traceback) -> None: ...
|
||||
@property
|
||||
def transaction(self): ...
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import MutableMapping
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Self
|
||||
|
||||
from .. import util
|
||||
from ..util import HasMemoized, hybridmethod, memoized_property
|
||||
@@ -98,8 +99,8 @@ class Executable(roles.StatementRole, Generative):
|
||||
is_text: bool
|
||||
is_delete: bool
|
||||
is_dml: bool
|
||||
def options(self: Self, *options) -> Self: ...
|
||||
def execution_options(self: Self, **kw) -> Self: ...
|
||||
def options(self, *options) -> Self: ...
|
||||
def execution_options(self, **kw) -> Self: ...
|
||||
def get_execution_options(self): ...
|
||||
def execute(self, *multiparams, **params): ...
|
||||
def scalar(self, *multiparams, **params): ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, Generic, TypeVar
|
||||
from typing_extensions import Literal
|
||||
from typing_extensions import Literal, Self
|
||||
|
||||
from .. import util
|
||||
from ..util import HasMemoized, memoized_property
|
||||
@@ -138,7 +138,7 @@ class TextClause(
|
||||
key: Any
|
||||
text: Any
|
||||
def __init__(self, text: str, bind: Incomplete | None = None) -> None: ...
|
||||
def bindparams(self: Self, *binds, **names_to_values) -> Self: ...
|
||||
def bindparams(self, *binds, **names_to_values) -> Self: ...
|
||||
def columns(self, *cols, **types): ...
|
||||
@property
|
||||
def type(self): ...
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
from .. import util
|
||||
from ..util import HasMemoized, memoized_property
|
||||
@@ -38,14 +39,14 @@ class Selectable(ReturnsRows):
|
||||
def corresponding_column(self, column, require_embedded: bool = ...): ...
|
||||
|
||||
class HasPrefixes:
|
||||
def prefix_with(self: Self, *expr, **kw) -> Self: ...
|
||||
def prefix_with(self, *expr, **kw) -> Self: ...
|
||||
|
||||
class HasSuffixes:
|
||||
def suffix_with(self: Self, *expr, **kw) -> Self: ...
|
||||
def suffix_with(self, *expr, **kw) -> Self: ...
|
||||
|
||||
class HasHints:
|
||||
def with_statement_hint(self, text, dialect_name: str = ...): ...
|
||||
def with_hint(self: Self, selectable, text: str, dialect_name: str = ...) -> Self: ...
|
||||
def with_hint(self, selectable, text: str, dialect_name: str = ...) -> Self: ...
|
||||
|
||||
class FromClause(roles.AnonymizedFromClauseRole, Selectable):
|
||||
__visit_name__: str
|
||||
@@ -191,9 +192,9 @@ class Values(Generative, FromClause):
|
||||
name: Any
|
||||
literal_binds: Any
|
||||
def __init__(self, *columns, **kw) -> None: ...
|
||||
def alias(self: Self, name: Incomplete | None, **kw) -> Self: ... # type: ignore[override]
|
||||
def lateral(self: Self, name: Incomplete | None = ...) -> Self: ...
|
||||
def data(self: Self, values) -> Self: ...
|
||||
def alias(self, name: Incomplete | None, **kw) -> Self: ... # type: ignore[override]
|
||||
def lateral(self, name: Incomplete | None = ...) -> Self: ...
|
||||
def data(self, values) -> Self: ...
|
||||
|
||||
class SelectBase(
|
||||
roles.SelectStatementRole,
|
||||
@@ -251,22 +252,17 @@ class GenerativeSelect(DeprecatedSelectBaseGenerations, SelectBase):
|
||||
bind: Incomplete | None = ...,
|
||||
) -> None: ...
|
||||
def with_for_update(
|
||||
self: Self,
|
||||
nowait: bool = ...,
|
||||
read: bool = ...,
|
||||
of: Incomplete | None = ...,
|
||||
skip_locked: bool = ...,
|
||||
key_share: bool = ...,
|
||||
self, nowait: bool = ..., read: bool = ..., of: Incomplete | None = ..., skip_locked: bool = ..., key_share: bool = ...
|
||||
) -> Self: ...
|
||||
def get_label_style(self): ...
|
||||
def set_label_style(self, style): ...
|
||||
def apply_labels(self): ...
|
||||
def limit(self: Self, limit: Incomplete | None) -> Self: ...
|
||||
def fetch(self: Self, count: Incomplete | None, with_ties: bool = ..., percent: bool = ...) -> Self: ...
|
||||
def offset(self: Self, offset: Incomplete | None) -> Self: ...
|
||||
def slice(self: Self, start: Incomplete | None, stop: Incomplete | None) -> Self: ...
|
||||
def order_by(self: Self, *clauses) -> Self: ...
|
||||
def group_by(self: Self, *clauses) -> Self: ...
|
||||
def limit(self, limit: Incomplete | None) -> Self: ...
|
||||
def fetch(self, count: Incomplete | None, with_ties: bool = ..., percent: bool = ...) -> Self: ...
|
||||
def offset(self, offset: Incomplete | None) -> Self: ...
|
||||
def slice(self, start: Incomplete | None, stop: Incomplete | None) -> Self: ...
|
||||
def order_by(self, *clauses) -> Self: ...
|
||||
def group_by(self, *clauses) -> Self: ...
|
||||
|
||||
class CompoundSelectState(CompileState): ...
|
||||
|
||||
@@ -344,11 +340,9 @@ class Select(
|
||||
@property
|
||||
def column_descriptions(self): ...
|
||||
def from_statement(self, statement): ...
|
||||
def join(self: Self, target, onclause: Incomplete | None = ..., isouter: bool = ..., full: bool = ...) -> Self: ...
|
||||
def join(self, target, onclause: Incomplete | None = ..., isouter: bool = ..., full: bool = ...) -> Self: ...
|
||||
def outerjoin_from(self, from_, target, onclause: Incomplete | None = ..., full: bool = ...): ...
|
||||
def join_from(
|
||||
self: Self, from_, target, onclause: Incomplete | None = ..., isouter: bool = ..., full: bool = ...
|
||||
) -> Self: ...
|
||||
def join_from(self, from_, target, onclause: Incomplete | None = ..., isouter: bool = ..., full: bool = ...) -> Self: ...
|
||||
def outerjoin(self, target, onclause: Incomplete | None = ..., full: bool = ...): ...
|
||||
def get_final_froms(self): ...
|
||||
@property
|
||||
@@ -359,18 +353,18 @@ class Select(
|
||||
def inner_columns(self): ...
|
||||
def is_derived_from(self, fromclause): ...
|
||||
def get_children(self, **kwargs): ...
|
||||
def add_columns(self: Self, *columns) -> Self: ...
|
||||
def add_columns(self, *columns) -> Self: ...
|
||||
def column(self, column): ...
|
||||
def reduce_columns(self, only_synonyms: bool = ...): ...
|
||||
def with_only_columns(self: Self, *columns, **kw) -> Self: ...
|
||||
def with_only_columns(self, *columns, **kw) -> Self: ...
|
||||
@property
|
||||
def whereclause(self): ...
|
||||
def where(self: Self, *whereclause) -> Self: ...
|
||||
def having(self: Self, having) -> Self: ...
|
||||
def distinct(self: Self, *expr) -> Self: ...
|
||||
def select_from(self: Self, *froms) -> Self: ...
|
||||
def correlate(self: Self, *fromclauses) -> Self: ...
|
||||
def correlate_except(self: Self, *fromclauses) -> Self: ...
|
||||
def where(self, *whereclause) -> Self: ...
|
||||
def having(self, having) -> Self: ...
|
||||
def distinct(self, *expr) -> Self: ...
|
||||
def select_from(self, *froms) -> Self: ...
|
||||
def correlate(self, *fromclauses) -> Self: ...
|
||||
def correlate_except(self, *fromclauses) -> Self: ...
|
||||
@HasMemoized.memoized_attribute
|
||||
def selected_columns(self): ...
|
||||
def self_group(self, against: Incomplete | None = ...): ...
|
||||
@@ -394,10 +388,10 @@ class ScalarSelect(roles.InElementRole, Generative, Grouping):
|
||||
def columns(self) -> None: ...
|
||||
@property
|
||||
def c(self): ...
|
||||
def where(self: Self, crit) -> Self: ...
|
||||
def where(self, crit) -> Self: ...
|
||||
def self_group(self, **kwargs): ...
|
||||
def correlate(self: Self, *fromclauses) -> Self: ...
|
||||
def correlate_except(self: Self, *fromclauses) -> Self: ...
|
||||
def correlate(self, *fromclauses) -> Self: ...
|
||||
def correlate_except(self, *fromclauses) -> Self: ...
|
||||
|
||||
class Exists(UnaryExpression):
|
||||
inherit_cache: bool
|
||||
@@ -418,7 +412,7 @@ class TextualSelect(SelectBase):
|
||||
def __init__(self, text, columns, positional: bool = ...) -> None: ...
|
||||
@HasMemoized.memoized_attribute
|
||||
def selected_columns(self): ...
|
||||
def bindparams(self: Self, *binds, **bind_as_values) -> Self: ...
|
||||
def bindparams(self, *binds, **bind_as_values) -> Self: ...
|
||||
|
||||
TextAsFrom = TextualSelect
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import collections.abc
|
||||
from _typeshed import Incomplete, Self, SupportsKeysAndGetItem
|
||||
from _typeshed import Incomplete, SupportsKeysAndGetItem
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping
|
||||
from typing import Any, Generic, NoReturn, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..cimmutabledict import immutabledict as immutabledict
|
||||
|
||||
@@ -82,21 +83,21 @@ class OrderedSet(set[_T], Generic[_T]):
|
||||
def __getitem__(self, key: int) -> _T: ...
|
||||
def __iter__(self) -> Iterator[_T]: ...
|
||||
def __add__(self, other: Iterable[_S]) -> OrderedSet[_S | _T]: ...
|
||||
def update(self: Self, iterable: Iterable[_T]) -> Self: ... # type: ignore[override]
|
||||
def update(self, iterable: Iterable[_T]) -> Self: ... # type: ignore[override]
|
||||
__ior__ = update # type: ignore[assignment]
|
||||
def union(self, other: Iterable[_S]) -> OrderedSet[_S | _T]: ... # type: ignore[override]
|
||||
__or__ = union # type: ignore[assignment] # pyright: ignore[reportGeneralTypeIssues]
|
||||
def intersection(self: Self, other: Iterable[Any]) -> Self: ... # type: ignore[override]
|
||||
__and__ = intersection # type: ignore[assignment] # pyright: ignore[reportGeneralTypeIssues]
|
||||
def intersection(self, other: Iterable[Any]) -> Self: ... # type: ignore[override]
|
||||
__and__ = intersection
|
||||
def symmetric_difference(self, other: Iterable[_S]) -> OrderedSet[_S | _T]: ...
|
||||
__xor__ = symmetric_difference # type: ignore[assignment] # pyright: ignore[reportGeneralTypeIssues]
|
||||
def difference(self: Self, other: Iterable[Any]) -> Self: ... # type: ignore[override]
|
||||
__sub__ = difference # type: ignore[assignment] # pyright: ignore[reportGeneralTypeIssues]
|
||||
def intersection_update(self: Self, other: Iterable[Any]) -> Self: ... # type: ignore[override]
|
||||
def difference(self, other: Iterable[Any]) -> Self: ... # type: ignore[override]
|
||||
__sub__ = difference
|
||||
def intersection_update(self, other: Iterable[Any]) -> Self: ... # type: ignore[override]
|
||||
__iand__ = intersection_update # type: ignore[assignment]
|
||||
def symmetric_difference_update(self: Self, other: Iterable[_T]) -> Self: ... # type: ignore[override]
|
||||
def symmetric_difference_update(self, other: Iterable[_T]) -> Self: ... # type: ignore[override]
|
||||
__ixor__ = symmetric_difference_update # type: ignore[assignment]
|
||||
def difference_update(self: Self, other: Iterable[Any]) -> Self: ... # type: ignore[override]
|
||||
def difference_update(self, other: Iterable[Any]) -> Self: ... # type: ignore[override]
|
||||
__isub__ = difference_update # type: ignore[assignment]
|
||||
|
||||
class IdentitySet:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
from . import compat
|
||||
|
||||
@@ -70,7 +71,7 @@ class memoized_property(Generic[_R]):
|
||||
__name__: str
|
||||
def __init__(self, fget: Callable[..., _R], doc: str | None = ...) -> None: ...
|
||||
@overload
|
||||
def __get__(self: Self, obj: None, cls: object) -> Self: ...
|
||||
def __get__(self, obj: None, cls: object) -> Self: ...
|
||||
@overload
|
||||
def __get__(self, obj: object, cls: object) -> _R: ...
|
||||
@classmethod
|
||||
@@ -85,7 +86,7 @@ class HasMemoized:
|
||||
__name__: str
|
||||
def __init__(self, fget: Callable[..., _R], doc: str | None = ...) -> None: ...
|
||||
@overload
|
||||
def __get__(self: Self, obj: None, cls: object) -> Self: ...
|
||||
def __get__(self, obj: None, cls: object) -> Self: ...
|
||||
@overload
|
||||
def __get__(self, obj: object, cls: object) -> _R: ...
|
||||
|
||||
@@ -119,7 +120,7 @@ class hybridproperty(Generic[_R]):
|
||||
def __get__(self, instance: None, owner: Any) -> _R: ...
|
||||
@overload
|
||||
def __get__(self, instance: object, owner: object) -> _R: ...
|
||||
def classlevel(self: Self, func: Callable[..., _R]) -> Self: ...
|
||||
def classlevel(self, func: Callable[..., _R]) -> Self: ...
|
||||
|
||||
class hybridmethod:
|
||||
func: Any
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Coroutine, Generator, Iterator
|
||||
from types import CodeType, FrameType, TracebackType, coroutine
|
||||
from typing import Any, Generic, TypeVar
|
||||
from typing_extensions import Self
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_T_co = TypeVar("_T_co", covariant=True)
|
||||
@@ -10,7 +10,7 @@ _T_contra = TypeVar("_T_contra", contravariant=True)
|
||||
|
||||
class AsyncBase(Generic[_T]):
|
||||
def __init__(self, file: str, loop: Any, executor: Any) -> None: ...
|
||||
def __aiter__(self: Self) -> Self: ...
|
||||
def __aiter__(self) -> Self: ...
|
||||
async def __anext__(self) -> _T: ...
|
||||
|
||||
class AiofilesContextManager(Generic[_T_co, _T_contra, _V_co]):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
log: Any
|
||||
ROOT: str
|
||||
@@ -13,7 +13,7 @@ class TraceHeader:
|
||||
self, root: str | None = ..., parent: str | None = ..., sampled: bool | None = ..., data: dict[str, Any] | None = ...
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def from_header_str(cls: type[Self], header) -> Self: ...
|
||||
def from_header_str(cls, header) -> Self: ...
|
||||
def to_header_str(self): ...
|
||||
@property
|
||||
def root(self): ...
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete, Self, SupportsRead
|
||||
from _typeshed import Incomplete, SupportsRead
|
||||
from collections.abc import Sequence
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
from .builder import ParserRejectedMarkup as ParserRejectedMarkup, TreeBuilder, XMLParsedAsHTMLWarning as XMLParsedAsHTMLWarning
|
||||
from .element import (
|
||||
@@ -45,7 +46,7 @@ class BeautifulSoup(Tag):
|
||||
element_classes: dict[type[PageElement], type[Any]] | None = ...,
|
||||
**kwargs,
|
||||
) -> None: ...
|
||||
def __copy__(self: Self) -> Self: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
hidden: bool
|
||||
current_data: Any
|
||||
currentTag: Any
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Iterable, Iterator
|
||||
from re import Pattern
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
from . import BeautifulSoup
|
||||
from .builder import TreeBuilder
|
||||
@@ -14,7 +14,7 @@ whitespace_re: Pattern[str]
|
||||
PYTHON_SPECIFIC_ENCODINGS: set[str]
|
||||
|
||||
class NamespacedAttribute(str):
|
||||
def __new__(cls: type[Self], prefix: str, name: str | None = ..., namespace: str | None = ...) -> Self: ...
|
||||
def __new__(cls, prefix: str, name: str | None = ..., namespace: str | None = ...) -> Self: ...
|
||||
|
||||
class AttributeValueWithCharsetSubstitution(str): ...
|
||||
|
||||
@@ -57,13 +57,13 @@ class PageElement:
|
||||
getText = get_text
|
||||
@property
|
||||
def text(self) -> str: ...
|
||||
def replace_with(self: Self, *args: PageElement | str) -> Self: ...
|
||||
def replace_with(self, *args: PageElement | str) -> Self: ...
|
||||
replaceWith = replace_with
|
||||
def unwrap(self: Self) -> Self: ...
|
||||
def unwrap(self) -> Self: ...
|
||||
replace_with_children = unwrap
|
||||
replaceWithChildren = unwrap
|
||||
def wrap(self, wrap_inside: _PageElementT) -> _PageElementT: ...
|
||||
def extract(self: Self, _self_index: int | None = ...) -> Self: ...
|
||||
def extract(self, _self_index: int | None = ...) -> Self: ...
|
||||
def insert(self, position: int, new_child: PageElement | str) -> None: ...
|
||||
def append(self, tag: PageElement | str) -> None: ...
|
||||
def extend(self, tags: Iterable[PageElement | str]) -> None: ...
|
||||
@@ -182,8 +182,8 @@ class NavigableString(str, PageElement):
|
||||
PREFIX: str
|
||||
SUFFIX: str
|
||||
known_xml: bool | None
|
||||
def __new__(cls: type[Self], value: str | bytes) -> Self: ...
|
||||
def __copy__(self: Self) -> Self: ...
|
||||
def __new__(cls, value: str | bytes) -> Self: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
def __getnewargs__(self) -> tuple[str]: ...
|
||||
def output_ready(self, formatter: Formatter | str | None = ...) -> str: ...
|
||||
@property
|
||||
@@ -260,7 +260,7 @@ class Tag(PageElement):
|
||||
namespaces: dict[str, str] | None = ...,
|
||||
) -> None: ...
|
||||
parserClass: type[BeautifulSoup] | None
|
||||
def __copy__(self: Self) -> Self: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
@property
|
||||
def is_empty_element(self) -> bool: ...
|
||||
@property
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Iterable, Mapping
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
from urllib.parse import ParseResult, SplitResult
|
||||
|
||||
from requests.auth import AuthBase
|
||||
@@ -50,7 +49,7 @@ class DAVClient:
|
||||
ssl_verify_cert: bool | str = ...,
|
||||
ssl_cert: str | tuple[str, str] | None = ...,
|
||||
) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, exc_type: object, exc_value: object, traceback: object) -> None: ...
|
||||
def principal(self, *, url: str | ParseResult | SplitResult | URL | None = ...) -> Principal: ...
|
||||
def calendar(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
_Element: TypeAlias = Any # actually lxml.etree._Element
|
||||
|
||||
@@ -12,10 +12,10 @@ class BaseElement:
|
||||
attributes: Incomplete | None
|
||||
caldav_class: Incomplete | None
|
||||
def __init__(self, name: str | None = ..., value: str | bytes | None = ...) -> None: ...
|
||||
def __add__(self: Self, other: BaseElement) -> Self: ...
|
||||
def __add__(self, other: BaseElement) -> Self: ...
|
||||
def xmlelement(self) -> _Element: ...
|
||||
def xmlchildren(self, root: _Element) -> None: ...
|
||||
def append(self: Self, element: BaseElement | Iterable[BaseElement]) -> Self: ...
|
||||
def append(self, element: BaseElement | Iterable[BaseElement]) -> Self: ...
|
||||
|
||||
class NamedBaseElement(BaseElement):
|
||||
def __init__(self, name: str | None = ...) -> None: ...
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import datetime
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable, Iterator, Mapping, Sequence
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
from urllib.parse import ParseResult, SplitResult
|
||||
|
||||
from vobject.base import VBase
|
||||
@@ -41,8 +41,8 @@ class DAVObject:
|
||||
def get_properties(
|
||||
self, props: Incomplete | None = ..., depth: int = ..., parse_response_xml: bool = ..., parse_props: bool = ...
|
||||
): ...
|
||||
def set_properties(self: Self, props: Incomplete | None = ...) -> Self: ...
|
||||
def save(self: Self) -> Self: ...
|
||||
def set_properties(self, props: Incomplete | None = ...) -> Self: ...
|
||||
def save(self) -> Self: ...
|
||||
def delete(self) -> None: ...
|
||||
|
||||
class CalendarSet(DAVObject):
|
||||
@@ -208,18 +208,18 @@ class CalendarObjectResource(DAVObject):
|
||||
props: Incomplete | None = ...,
|
||||
) -> None: ...
|
||||
def add_organizer(self) -> None: ...
|
||||
def split_expanded(self: Self) -> list[Self]: ...
|
||||
def split_expanded(self) -> list[Self]: ...
|
||||
def expand_rrule(self, start: datetime.datetime, end: datetime.datetime) -> None: ...
|
||||
def add_attendee(self, attendee, no_default_parameters: bool = ..., **parameters) -> None: ...
|
||||
def is_invite_request(self) -> bool: ...
|
||||
def accept_invite(self, calendar: Incomplete | None = ...) -> None: ...
|
||||
def decline_invite(self, calendar: Incomplete | None = ...) -> None: ...
|
||||
def tentatively_accept_invite(self, calendar: Incomplete | None = ...) -> None: ...
|
||||
def copy(self: Self, keep_uid: bool = ..., new_parent: Incomplete | None = ...) -> Self: ...
|
||||
def load(self: Self) -> Self: ...
|
||||
def copy(self, keep_uid: bool = ..., new_parent: Incomplete | None = ...) -> Self: ...
|
||||
def load(self) -> Self: ...
|
||||
def change_attendee_status(self, attendee: Incomplete | None = ..., **kwargs) -> None: ...
|
||||
def save(
|
||||
self: Self,
|
||||
self,
|
||||
no_overwrite: bool = ...,
|
||||
no_create: bool = ...,
|
||||
obj_type: str | None = ...,
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import threading
|
||||
from _typeshed import Self
|
||||
from collections.abc import Iterator
|
||||
from types import TracebackType
|
||||
from typing import Protocol
|
||||
from typing_extensions import Literal
|
||||
from typing_extensions import Literal, Self
|
||||
|
||||
__version__: str
|
||||
|
||||
@@ -24,7 +23,7 @@ class Spinner:
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def init_spin(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> Literal[False]: ...
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import datetime
|
||||
from _typeshed import ReadableBuffer, Self
|
||||
from _typeshed import ReadableBuffer
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Iterator
|
||||
from re import Match, Pattern
|
||||
from typing import Any, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
_RetType: TypeAlias = type[float | datetime.datetime]
|
||||
|
||||
@@ -69,7 +69,7 @@ class croniter(Iterator[Any]):
|
||||
def get_prev(self, ret_type: _RetType | None = ...) -> Any: ...
|
||||
def get_current(self, ret_type: _RetType | None = ...) -> Any: ...
|
||||
def set_current(self, start_time: float | datetime.datetime | None, force: bool = ...) -> float: ...
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
def __iter__(self) -> Self: ...
|
||||
def next(
|
||||
self, ret_type: _RetType | None = ..., start_time: float | datetime.datetime | None = ..., is_prev: bool | None = ...
|
||||
) -> Any: ...
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
class Settings:
|
||||
def __new__(cls: type[Self], *args, **kw) -> Self: ...
|
||||
def __new__(cls, *args, **kw) -> Self: ...
|
||||
def __init__(self, settings: Incomplete | None = ...) -> None: ...
|
||||
@classmethod
|
||||
def get_key(cls, settings: Incomplete | None = ...): ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from typing import Any, ClassVar, NamedTuple
|
||||
from typing_extensions import Self
|
||||
|
||||
__docformat__: str
|
||||
__version__: str
|
||||
@@ -14,13 +14,7 @@ class _VersionInfo(NamedTuple):
|
||||
|
||||
class VersionInfo(_VersionInfo):
|
||||
def __new__(
|
||||
cls: type[Self],
|
||||
major: int = ...,
|
||||
minor: int = ...,
|
||||
micro: int = ...,
|
||||
releaselevel: str = ...,
|
||||
serial: int = ...,
|
||||
release: bool = ...,
|
||||
cls, major: int = ..., minor: int = ..., micro: int = ..., releaselevel: str = ..., serial: int = ..., release: bool = ...
|
||||
) -> Self: ...
|
||||
|
||||
__version_info__: VersionInfo
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import xml.dom.minidom
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Callable, Generator, Iterable, Sequence
|
||||
from typing import Any, ClassVar, Protocol, TypeVar, overload
|
||||
from typing_extensions import Literal
|
||||
from typing_extensions import Literal, Self
|
||||
|
||||
from docutils.transforms import Transformer
|
||||
|
||||
@@ -26,9 +26,9 @@ class Node:
|
||||
# (although it's not used in the docutils implementation) because it
|
||||
# makes Mypy reject Node() with "Cannot instantiate abstract class".
|
||||
@abstractmethod
|
||||
def copy(self: Self) -> Self: ...
|
||||
def copy(self) -> Self: ...
|
||||
@abstractmethod
|
||||
def deepcopy(self: Self) -> Self: ...
|
||||
def deepcopy(self) -> Self: ...
|
||||
@abstractmethod
|
||||
def pformat(self, indent: str = ..., level: int = ...) -> str: ...
|
||||
@abstractmethod
|
||||
@@ -97,9 +97,9 @@ class Element(Node):
|
||||
def __delitem__(self, key: str | int | slice) -> None: ...
|
||||
def __add__(self, other: list[Node]) -> list[Node]: ...
|
||||
def __radd__(self, other: list[Node]) -> list[Node]: ...
|
||||
def __iadd__(self: Self, other: Node | Iterable[Node]) -> Self: ...
|
||||
def copy(self: Self) -> Self: ...
|
||||
def deepcopy(self: Self) -> Self: ...
|
||||
def __iadd__(self, other: Node | Iterable[Node]) -> Self: ...
|
||||
def copy(self) -> Self: ...
|
||||
def deepcopy(self) -> Self: ...
|
||||
def pformat(self, indent: str = ..., level: int = ...) -> str: ...
|
||||
def astext(self) -> str: ...
|
||||
def __getattr__(self, __name: str) -> Incomplete: ...
|
||||
@@ -109,11 +109,11 @@ class Text(Node, str):
|
||||
children: tuple[()]
|
||||
|
||||
# we omit the rawsource parameter because it has been deprecated and is ignored
|
||||
def __new__(cls: type[Self], data: str) -> Self: ...
|
||||
def __new__(cls, data: str) -> Self: ...
|
||||
def __init__(self, data: str) -> None: ...
|
||||
def shortrepr(self, maxlen: int = ...) -> str: ...
|
||||
def copy(self: Self) -> Self: ...
|
||||
def deepcopy(self: Self) -> Self: ...
|
||||
def copy(self) -> Self: ...
|
||||
def deepcopy(self) -> Self: ...
|
||||
def pformat(self, indent: str = ..., level: int = ...) -> str: ...
|
||||
def astext(self) -> str: ...
|
||||
def rstrip(self, chars: str | None = ...) -> str: ...
|
||||
@@ -124,8 +124,8 @@ class Root: ...
|
||||
|
||||
class document(Root, Structural, Element):
|
||||
transformer: Transformer
|
||||
def copy(self: Self) -> Self: ...
|
||||
def deepcopy(self: Self) -> Self: ...
|
||||
def copy(self) -> Self: ...
|
||||
def deepcopy(self) -> Self: ...
|
||||
def pformat(self, indent: str = ..., level: int = ...) -> str: ...
|
||||
def astext(self) -> str: ...
|
||||
def __getattr__(self, __name: str) -> Incomplete: ...
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from collections.abc import Iterator, Sequence
|
||||
from configparser import ConfigParser
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from re import Pattern
|
||||
@@ -36,14 +36,14 @@ class EntryPoint:
|
||||
) -> None: ...
|
||||
def load(self) -> Any: ...
|
||||
@classmethod
|
||||
def from_string(cls: type[Self], epstr: str, name: str, distro: Distribution | None = ...) -> Self: ...
|
||||
def from_string(cls, epstr: str, name: str, distro: Distribution | None = ...) -> Self: ...
|
||||
|
||||
class Distribution:
|
||||
name: str
|
||||
version: str
|
||||
def __init__(self, name: str, version: str) -> None: ...
|
||||
@classmethod
|
||||
def from_name_version(cls: type[Self], name: str) -> Self: ...
|
||||
def from_name_version(cls, name: str) -> Self: ...
|
||||
|
||||
def iter_files_distros(
|
||||
path: Sequence[str] | None = ..., repeated_distro: str = ...
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import decimal
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Callable, Generator, Iterator
|
||||
from contextlib import contextmanager
|
||||
from re import Pattern
|
||||
from typing import Any, ClassVar, NamedTuple, TypeVar
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
from .syntax import Name, Raw
|
||||
|
||||
@@ -38,7 +38,7 @@ class _DeviceRGBBase(NamedTuple):
|
||||
|
||||
class DeviceRGB(_DeviceRGBBase):
|
||||
OPERATOR: ClassVar[str]
|
||||
def __new__(cls: type[Self], r: Number, g: Number, b: Number, a: Number | None = ...) -> Self: ...
|
||||
def __new__(cls, r: Number, g: Number, b: Number, a: Number | None = ...) -> Self: ...
|
||||
@property
|
||||
def colors(self) -> tuple[Number, Number, Number]: ...
|
||||
def serialize(self) -> str: ...
|
||||
@@ -49,7 +49,7 @@ class _DeviceGrayBase(NamedTuple):
|
||||
|
||||
class DeviceGray(_DeviceGrayBase):
|
||||
OPERATOR: ClassVar[str]
|
||||
def __new__(cls: type[Self], g: Number, a: Number | None = ...) -> Self: ...
|
||||
def __new__(cls, g: Number, a: Number | None = ...) -> Self: ...
|
||||
@property
|
||||
def colors(self) -> tuple[Number]: ...
|
||||
def serialize(self) -> str: ...
|
||||
@@ -63,7 +63,7 @@ class _DeviceCMYKBase(NamedTuple):
|
||||
|
||||
class DeviceCMYK(_DeviceCMYKBase):
|
||||
OPERATOR: ClassVar[str]
|
||||
def __new__(cls: type[Self], c: Number, m: Number, y: Number, k: Number, a: Number | None = ...) -> Self: ...
|
||||
def __new__(cls, c: Number, m: Number, y: Number, k: Number, a: Number | None = ...) -> Self: ...
|
||||
@property
|
||||
def colors(self) -> tuple[Number, Number, Number, Number]: ...
|
||||
def serialize(self) -> str: ...
|
||||
@@ -128,7 +128,7 @@ class GraphicsStyle:
|
||||
@classmethod
|
||||
def merge(cls, parent, child): ...
|
||||
def __init__(self) -> None: ...
|
||||
def __deepcopy__(self: Self, memo) -> Self: ...
|
||||
def __deepcopy__(self, memo) -> Self: ...
|
||||
@property
|
||||
def allow_transparency(self): ...
|
||||
@allow_transparency.setter
|
||||
@@ -322,7 +322,7 @@ class DrawingContext:
|
||||
|
||||
class PaintedPath:
|
||||
def __init__(self, x: int = ..., y: int = ...) -> None: ...
|
||||
def __deepcopy__(self: Self, memo) -> Self: ...
|
||||
def __deepcopy__(self, memo) -> Self: ...
|
||||
@property
|
||||
def style(self): ...
|
||||
@property
|
||||
@@ -342,26 +342,26 @@ class PaintedPath:
|
||||
@clipping_path.setter
|
||||
def clipping_path(self, new_clipath) -> None: ...
|
||||
@contextmanager
|
||||
def transform_group(self: Self, transform) -> Iterator[Self]: ...
|
||||
def transform_group(self, transform) -> Iterator[Self]: ...
|
||||
def add_path_element(self, item, _copy: bool = ...) -> None: ...
|
||||
def remove_last_path_element(self) -> None: ...
|
||||
def rectangle(self: Self, x, y, w, h, rx: int = ..., ry: int = ...) -> Self: ...
|
||||
def circle(self: Self, cx, cy, r) -> Self: ...
|
||||
def ellipse(self: Self, cx, cy, rx, ry) -> Self: ...
|
||||
def move_to(self: Self, x, y) -> Self: ...
|
||||
def move_relative(self: Self, x, y) -> Self: ...
|
||||
def line_to(self: Self, x, y) -> Self: ...
|
||||
def line_relative(self: Self, dx, dy) -> Self: ...
|
||||
def horizontal_line_to(self: Self, x) -> Self: ...
|
||||
def horizontal_line_relative(self: Self, dx) -> Self: ...
|
||||
def vertical_line_to(self: Self, y) -> Self: ...
|
||||
def vertical_line_relative(self: Self, dy) -> Self: ...
|
||||
def curve_to(self: Self, x1, y1, x2, y2, x3, y3) -> Self: ...
|
||||
def curve_relative(self: Self, dx1, dy1, dx2, dy2, dx3, dy3) -> Self: ...
|
||||
def quadratic_curve_to(self: Self, x1, y1, x2, y2) -> Self: ...
|
||||
def quadratic_curve_relative(self: Self, dx1, dy1, dx2, dy2) -> Self: ...
|
||||
def arc_to(self: Self, rx, ry, rotation, large_arc, positive_sweep, x, y) -> Self: ...
|
||||
def arc_relative(self: Self, rx, ry, rotation, large_arc, positive_sweep, dx, dy) -> Self: ...
|
||||
def rectangle(self, x, y, w, h, rx: int = ..., ry: int = ...) -> Self: ...
|
||||
def circle(self, cx, cy, r) -> Self: ...
|
||||
def ellipse(self, cx, cy, rx, ry) -> Self: ...
|
||||
def move_to(self, x, y) -> Self: ...
|
||||
def move_relative(self, x, y) -> Self: ...
|
||||
def line_to(self, x, y) -> Self: ...
|
||||
def line_relative(self, dx, dy) -> Self: ...
|
||||
def horizontal_line_to(self, x) -> Self: ...
|
||||
def horizontal_line_relative(self, dx) -> Self: ...
|
||||
def vertical_line_to(self, y) -> Self: ...
|
||||
def vertical_line_relative(self, dy) -> Self: ...
|
||||
def curve_to(self, x1, y1, x2, y2, x3, y3) -> Self: ...
|
||||
def curve_relative(self, dx1, dy1, dx2, dy2, dx3, dy3) -> Self: ...
|
||||
def quadratic_curve_to(self, x1, y1, x2, y2) -> Self: ...
|
||||
def quadratic_curve_relative(self, dx1, dy1, dx2, dy2) -> Self: ...
|
||||
def arc_to(self, rx, ry, rotation, large_arc, positive_sweep, x, y) -> Self: ...
|
||||
def arc_relative(self, rx, ry, rotation, large_arc, positive_sweep, dx, dy) -> Self: ...
|
||||
def close(self) -> None: ...
|
||||
def render(
|
||||
self, gsd_registry, style, last_item, initial_point, debug_stream: Incomplete | None = ..., pfx: Incomplete | None = ...
|
||||
@@ -380,7 +380,7 @@ class GraphicsContext:
|
||||
style: GraphicsStyle
|
||||
path_items: list[Incomplete]
|
||||
def __init__(self) -> None: ...
|
||||
def __deepcopy__(self: Self, memo) -> Self: ...
|
||||
def __deepcopy__(self, memo) -> Self: ...
|
||||
@property
|
||||
def transform(self) -> Transform | None: ...
|
||||
@transform.setter
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from enum import Enum, Flag, IntEnum, IntFlag
|
||||
from typing_extensions import Literal
|
||||
from typing_extensions import Literal, Self
|
||||
|
||||
from .syntax import Name
|
||||
|
||||
@@ -10,11 +9,11 @@ class SignatureFlag(IntEnum):
|
||||
|
||||
class CoerciveEnum(Enum):
|
||||
@classmethod
|
||||
def coerce(cls: type[Self], value: Self | str) -> Self: ...
|
||||
def coerce(cls, value: Self | str) -> Self: ...
|
||||
|
||||
class CoerciveIntEnum(IntEnum):
|
||||
@classmethod
|
||||
def coerce(cls: type[Self], value: Self | str | int) -> Self: ...
|
||||
def coerce(cls, value: Self | str | int) -> Self: ...
|
||||
|
||||
class CharVPos(CoerciveEnum):
|
||||
SUP: str
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import abc
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
ConnectionError: Any
|
||||
|
||||
@@ -38,7 +39,7 @@ class _InProcessGlobalCache(GlobalCache):
|
||||
class RedisCache(GlobalCache):
|
||||
transient_errors: Any
|
||||
@classmethod
|
||||
def from_environment(cls: type[Self], strict_read: bool = ..., strict_write: bool = ...) -> Self: ...
|
||||
def from_environment(cls, strict_read: bool = ..., strict_write: bool = ...) -> Self: ...
|
||||
redis: Any
|
||||
strict_read: Any
|
||||
strict_write: Any
|
||||
@@ -60,9 +61,7 @@ class MemcacheCache(GlobalCache):
|
||||
def __eq__(self, other): ...
|
||||
transient_errors: Any
|
||||
@classmethod
|
||||
def from_environment(
|
||||
cls: type[Self], max_pool_size: int = ..., strict_read: bool = ..., strict_write: bool = ...
|
||||
) -> Self: ...
|
||||
def from_environment(cls, max_pool_size: int = ..., strict_read: bool = ..., strict_write: bool = ...) -> Self: ...
|
||||
client: Any
|
||||
strict_read: Any
|
||||
strict_write: Any
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import datetime
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable, Iterable, Sequence
|
||||
from typing import Any, NoReturn
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
from google.cloud.ndb import exceptions, key as key_module, query as query_module, tasklets as tasklets_module
|
||||
|
||||
@@ -27,7 +26,7 @@ class _NotEqualMixin:
|
||||
_Direction: TypeAlias = Literal["asc", "desc"]
|
||||
|
||||
class IndexProperty(_NotEqualMixin):
|
||||
def __new__(cls: type[Self], name: str, direction: _Direction) -> Self: ...
|
||||
def __new__(cls, name: str, direction: _Direction) -> Self: ...
|
||||
@property
|
||||
def name(self) -> str: ...
|
||||
@property
|
||||
@@ -36,7 +35,7 @@ class IndexProperty(_NotEqualMixin):
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
class Index(_NotEqualMixin):
|
||||
def __new__(cls: type[Self], kind: str, properties: list[IndexProperty], ancestor: bool) -> Self: ...
|
||||
def __new__(cls, kind: str, properties: list[IndexProperty], ancestor: bool) -> Self: ...
|
||||
@property
|
||||
def kind(self) -> str: ...
|
||||
@property
|
||||
@@ -59,7 +58,7 @@ class IndexState(_NotEqualMixin):
|
||||
|
||||
class ModelAdapter:
|
||||
# This actually returns NoReturn, but mypy can't handle that
|
||||
def __new__(cls: type[Self], *args, **kwargs) -> Self: ...
|
||||
def __new__(cls, *args, **kwargs) -> Self: ...
|
||||
|
||||
def make_connection(*args, **kwargs) -> NoReturn: ...
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import http.client
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Self
|
||||
|
||||
from .error import *
|
||||
|
||||
@@ -184,4 +185,4 @@ class Response(dict[str, Any]):
|
||||
previous: Any
|
||||
def __init__(self, info) -> None: ...
|
||||
@property
|
||||
def dict(self: Self) -> Self: ...
|
||||
def dict(self) -> Self: ...
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from typing import Any, overload
|
||||
from typing_extensions import final
|
||||
from typing_extensions import Self, final
|
||||
|
||||
ATTR_CASE: int
|
||||
CASE_LOWER: int
|
||||
@@ -85,7 +84,7 @@ WCHAR_YES: int
|
||||
|
||||
@final
|
||||
class IBM_DBClientInfo:
|
||||
def __new__(cls: type[Self], *args: object, **kwargs: object) -> Self: ...
|
||||
def __new__(cls, *args: object, **kwargs: object) -> Self: ...
|
||||
APPL_CODEPAGE: int
|
||||
CONN_CODEPAGE: int
|
||||
DATA_SOURCE_NAME: str
|
||||
@@ -97,11 +96,11 @@ class IBM_DBClientInfo:
|
||||
|
||||
@final
|
||||
class IBM_DBConnection:
|
||||
def __new__(cls: type[Self], *args: object, **kwargs: object) -> Self: ...
|
||||
def __new__(cls, *args: object, **kwargs: object) -> Self: ...
|
||||
|
||||
@final
|
||||
class IBM_DBServerInfo:
|
||||
def __new__(cls: type[Self], *args: object, **kwargs: object) -> Self: ...
|
||||
def __new__(cls, *args: object, **kwargs: object) -> Self: ...
|
||||
DBMS_NAME: str
|
||||
DBMS_VER: str
|
||||
DB_CODEPAGE: int
|
||||
@@ -127,7 +126,7 @@ class IBM_DBServerInfo:
|
||||
|
||||
@final
|
||||
class IBM_DBStatement:
|
||||
def __new__(cls: type[Self], *args: object, **kwargs: object) -> Self: ...
|
||||
def __new__(cls, *args: object, **kwargs: object) -> Self: ...
|
||||
|
||||
def active(__connection: IBM_DBConnection | None) -> bool: ...
|
||||
def autocommit(__connection: IBM_DBConnection, __value: int = ...) -> int | bool: ...
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from enum import Enum
|
||||
from typing_extensions import Self
|
||||
|
||||
from influxdb_client.client.flux_table import TableList
|
||||
|
||||
@@ -44,9 +45,9 @@ class FluxCsvParser:
|
||||
query_options: Incomplete | None = ...,
|
||||
response_metadata_mode: FluxResponseMetadataMode = ...,
|
||||
) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, exc_type, exc_val, exc_tb) -> None: ...
|
||||
async def __aenter__(self: Self) -> Self: ...
|
||||
async def __aenter__(self) -> Self: ...
|
||||
async def __aexit__(self, exc_type, exc_val, exc_tb) -> None: ...
|
||||
def generator(self) -> Generator[Incomplete, None, None]: ...
|
||||
def generator_async(self): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from typing_extensions import Self
|
||||
|
||||
from influxdb_client import HealthCheck, InvokableScriptsApi, Ready
|
||||
from influxdb_client.client._base import _BaseClient
|
||||
@@ -41,7 +42,7 @@ class InfluxDBClient(_BaseClient):
|
||||
retries: bool | Incomplete = ...,
|
||||
profilers: Incomplete | None = ...,
|
||||
) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, exc_type: object, exc_value: object, traceback: object) -> None: ...
|
||||
@classmethod
|
||||
def from_config_file(cls, config_file: str = ..., debug: Incomplete | None = ..., enable_gzip: bool = ..., **kwargs): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from typing_extensions import Self
|
||||
|
||||
from influxdb_client.client._base import _BaseClient
|
||||
from influxdb_client.client.delete_api_async import DeleteApiAsync
|
||||
@@ -35,7 +36,7 @@ class InfluxDBClientAsync(_BaseClient):
|
||||
retries: bool | Incomplete = ...,
|
||||
profilers: Incomplete | None = ...,
|
||||
) -> None: ...
|
||||
async def __aenter__(self: Self) -> Self: ...
|
||||
async def __aenter__(self) -> Self: ...
|
||||
async def __aexit__(self, exc_type: object, exc: object, tb: object) -> None: ...
|
||||
async def close(self) -> None: ...
|
||||
@classmethod
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from _typeshed import Incomplete, Self, SupportsGetItem, SupportsItems
|
||||
from _typeshed import Incomplete, SupportsGetItem, SupportsItems
|
||||
from collections.abc import Iterable
|
||||
from datetime import datetime, timedelta
|
||||
from numbers import Integral
|
||||
from typing import Any
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
from influxdb_client.domain.write_precision import _WritePrecision
|
||||
|
||||
@@ -29,9 +29,9 @@ class Point:
|
||||
fields: SupportsItems[str, Literal["int", "uint", "float"]] = ...,
|
||||
) -> Point: ...
|
||||
def __init__(self, measurement_name: str) -> None: ...
|
||||
def time(self: Self, time: _Time, write_precision: _WritePrecision = ...) -> Self: ...
|
||||
def tag(self: Self, key: str, value: _Value) -> Self: ...
|
||||
def field(self: Self, field: str, value: _Value) -> Self: ...
|
||||
def time(self, time: _Time, write_precision: _WritePrecision = ...) -> Self: ...
|
||||
def tag(self, key: str, value: _Value) -> Self: ...
|
||||
def field(self, field: str, value: _Value) -> Self: ...
|
||||
def to_line_protocol(self, precision: _WritePrecision | None = ...) -> str: ...
|
||||
@property
|
||||
def write_precision(self) -> _WritePrecision: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Iterable
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from typing_extensions import ParamSpec
|
||||
from typing_extensions import ParamSpec, Self
|
||||
|
||||
from .config import Config
|
||||
from .context import Context
|
||||
@@ -105,7 +105,7 @@ class Call:
|
||||
kwargs: dict[str, Any] | None = ...,
|
||||
) -> None: ...
|
||||
def __getattr__(self, name: str) -> Any: ...
|
||||
def __deepcopy__(self: Self, memo: Any) -> Self: ...
|
||||
def __deepcopy__(self, memo: Any) -> Self: ...
|
||||
def __eq__(self, other: Call) -> bool: ... # type: ignore[override]
|
||||
def make_context(self, config: Config) -> Context: ...
|
||||
def clone_data(self): ...
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from _typeshed import Incomplete, Self, SupportsRichComparison
|
||||
from _typeshed import Incomplete, SupportsRichComparison
|
||||
from collections import deque
|
||||
from collections.abc import Callable, Container, Iterable, Sequence
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
from jsonschema import _utils, protocols
|
||||
from jsonschema._types import TypeChecker
|
||||
@@ -40,7 +40,7 @@ class _Error(Exception):
|
||||
type_checker: _utils.Unset | TypeChecker = ...,
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def create_from(cls: type[Self], other: _Error) -> Self: ...
|
||||
def create_from(cls, other: _Error) -> Self: ...
|
||||
@property
|
||||
def absolute_path(self) -> Sequence[str | int]: ...
|
||||
@property
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _collections_abc import Generator, dict_keys
|
||||
from _typeshed import Incomplete, ReadableBuffer, Self
|
||||
from _typeshed import Incomplete, ReadableBuffer
|
||||
from types import TracebackType
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
from pyasn1.type.base import Asn1Item
|
||||
|
||||
@@ -115,7 +115,7 @@ class Connection:
|
||||
def stream(self, value) -> None: ...
|
||||
@property
|
||||
def usage(self): ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> Literal[False] | None: ...
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import socket
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
class LDAPException(Exception): ...
|
||||
|
||||
class LDAPOperationResult(LDAPException):
|
||||
def __new__(
|
||||
cls: type[Self],
|
||||
cls,
|
||||
result: Incomplete | None = ...,
|
||||
description: Incomplete | None = ...,
|
||||
dn: Incomplete | None = ...,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Coroutine, Mapping, Sequence
|
||||
from contextlib import AbstractContextManager
|
||||
from types import TracebackType
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from typing_extensions import Literal
|
||||
from typing_extensions import Literal, Self
|
||||
|
||||
_F = TypeVar("_F", bound=Callable[..., Any])
|
||||
_AF = TypeVar("_AF", bound=Callable[..., Coroutine[Any, Any, Any]])
|
||||
@@ -45,7 +45,7 @@ DEFAULT: _SentinelObject
|
||||
|
||||
class _Call(tuple[Any, ...]):
|
||||
def __new__(
|
||||
cls: type[Self],
|
||||
cls,
|
||||
value: Any = ...,
|
||||
name: Incomplete | None = ...,
|
||||
parent: Incomplete | None = ...,
|
||||
@@ -85,7 +85,7 @@ class Base:
|
||||
# something that can't be expressed with our static type system.
|
||||
class NonCallableMock(Base, Any):
|
||||
def __new__(
|
||||
cls: type[Self],
|
||||
cls,
|
||||
spec: list[str] | object | type[object] | None = ...,
|
||||
wraps: Incomplete | None = ...,
|
||||
name: str | None = ...,
|
||||
@@ -373,7 +373,7 @@ class _SpecState:
|
||||
def mock_open(mock: Incomplete | None = ..., read_data: Any = ...) -> Any: ...
|
||||
|
||||
class PropertyMock(Mock):
|
||||
def __get__(self: Self, obj: _T, obj_type: type[_T] | None = ...) -> Self: ...
|
||||
def __get__(self, obj: _T, obj_type: type[_T] | None = ...) -> Self: ...
|
||||
def __set__(self, obj: Any, value: Any) -> None: ...
|
||||
|
||||
def seal(mock: Any) -> None: ...
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import abc
|
||||
import sys
|
||||
from _collections_abc import dict_items, dict_keys, dict_values
|
||||
from _typeshed import IdentityFunction, Self
|
||||
from _typeshed import IdentityFunction
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, ClassVar, Generic, TypeVar, overload, type_check_only
|
||||
from typing_extensions import Never
|
||||
from typing_extensions import Never, Self
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_U = TypeVar("_U")
|
||||
@@ -16,20 +16,20 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
|
||||
__total__: ClassVar[bool]
|
||||
# Unlike typing(_extensions).TypedDict,
|
||||
# subclasses of mypy_extensions.TypedDict do NOT have the __required_keys__ and __optional_keys__ ClassVars
|
||||
def copy(self: Self) -> Self: ...
|
||||
def copy(self) -> Self: ...
|
||||
# Using Never so that only calls using mypy plugin hook that specialize the signature
|
||||
# can go through.
|
||||
def setdefault(self, k: Never, default: object) -> object: ...
|
||||
# Mypy plugin hook for 'pop' expects that 'default' has a type variable type.
|
||||
def pop(self, k: Never, default: _T = ...) -> object: ... # pyright: ignore[reportInvalidTypeVarUse]
|
||||
def update(self: Self, __m: Self) -> None: ...
|
||||
def update(self, __m: Self) -> None: ...
|
||||
def items(self) -> dict_items[str, object]: ...
|
||||
def keys(self) -> dict_keys[str, object]: ...
|
||||
def values(self) -> dict_values[str, object]: ...
|
||||
def __delitem__(self, k: Never) -> None: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __or__(self: Self, __other: Self) -> Self: ...
|
||||
def __ior__(self: Self, __other: Self) -> Self: ...
|
||||
def __or__(self, __other: Self) -> Self: ...
|
||||
def __ior__(self, __other: Self) -> Self: ...
|
||||
|
||||
def TypedDict(typename: str, fields: dict[str, type[Any]], total: bool = ...) -> type[dict[str, Any]]: ...
|
||||
@overload
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
from . import _mysql, cursors
|
||||
from ._exceptions import (
|
||||
@@ -27,7 +27,7 @@ class Connection(_mysql.connection):
|
||||
encoding: str
|
||||
messages: Any
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from typing import ClassVar, SupportsInt, overload
|
||||
from typing_extensions import Literal, SupportsIndex
|
||||
from typing_extensions import Literal, Self, SupportsIndex
|
||||
|
||||
from netaddr.core import DictDotLookup
|
||||
from netaddr.ip import IPAddress
|
||||
@@ -76,8 +75,8 @@ class EUI(BaseIdentifier):
|
||||
def words(self) -> tuple[int, ...]: ...
|
||||
@property
|
||||
def bin(self) -> str: ...
|
||||
def eui64(self: Self) -> Self: ...
|
||||
def modified_eui64(self: Self) -> Self: ...
|
||||
def eui64(self) -> Self: ...
|
||||
def modified_eui64(self) -> Self: ...
|
||||
def ipv6(self, prefix: str | SupportsInt | SupportsIndex) -> IPAddress: ...
|
||||
def ipv6_link_local(self) -> IPAddress: ...
|
||||
@property
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import SupportsInt, overload
|
||||
from typing_extensions import Literal, SupportsIndex, TypeAlias
|
||||
from typing_extensions import Literal, Self, SupportsIndex, TypeAlias
|
||||
|
||||
from netaddr.core import DictDotLookup
|
||||
from netaddr.strategy.ipv6 import ipv6_verbose
|
||||
@@ -45,12 +45,12 @@ class IPAddress(BaseIP):
|
||||
def netmask_bits(self) -> int: ...
|
||||
def is_hostmask(self) -> bool: ...
|
||||
def is_netmask(self) -> bool: ...
|
||||
def __iadd__(self: Self, num: int) -> Self: ...
|
||||
def __isub__(self: Self, num: int) -> Self: ...
|
||||
def __add__(self: Self, num: int) -> Self: ...
|
||||
def __iadd__(self, num: int) -> Self: ...
|
||||
def __isub__(self, num: int) -> Self: ...
|
||||
def __add__(self, num: int) -> Self: ...
|
||||
__radd__ = __add__
|
||||
def __sub__(self: Self, num: int) -> Self: ...
|
||||
def __rsub__(self: Self, num: int) -> Self: ...
|
||||
def __sub__(self, num: int) -> Self: ...
|
||||
def __rsub__(self, num: int) -> Self: ...
|
||||
def key(self) -> tuple[int, ...]: ...
|
||||
def sort_key(self) -> tuple[int, ...]: ...
|
||||
def __int__(self) -> int: ...
|
||||
@@ -68,14 +68,14 @@ class IPAddress(BaseIP):
|
||||
def bin(self) -> str: ...
|
||||
@property
|
||||
def reverse_dns(self) -> str: ...
|
||||
def ipv4(self: Self) -> Self: ...
|
||||
def ipv6(self: Self, ipv4_compatible: bool = ...) -> Self: ...
|
||||
def ipv4(self) -> Self: ...
|
||||
def ipv6(self, ipv4_compatible: bool = ...) -> Self: ...
|
||||
def format(self, dialect: type[ipv6_verbose] | None = ...) -> str: ...
|
||||
def __or__(self: Self, other: str | SupportsInt | SupportsIndex) -> Self: ...
|
||||
def __and__(self: Self, other: str | SupportsInt | SupportsIndex) -> Self: ...
|
||||
def __xor__(self: Self, other: str | SupportsInt | SupportsIndex) -> Self: ...
|
||||
def __lshift__(self: Self, numbits: int) -> Self: ...
|
||||
def __rshift__(self: Self, numbits: int) -> Self: ...
|
||||
def __or__(self, other: str | SupportsInt | SupportsIndex) -> Self: ...
|
||||
def __and__(self, other: str | SupportsInt | SupportsIndex) -> Self: ...
|
||||
def __xor__(self, other: str | SupportsInt | SupportsIndex) -> Self: ...
|
||||
def __lshift__(self, numbits: int) -> Self: ...
|
||||
def __rshift__(self, numbits: int) -> Self: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
|
||||
class IPListMixin:
|
||||
@@ -122,18 +122,18 @@ class IPNetwork(BaseIP, IPListMixin):
|
||||
def hostmask(self) -> IPAddress: ...
|
||||
@property
|
||||
def cidr(self) -> IPNetwork: ...
|
||||
def __iadd__(self: Self, num: int) -> Self: ...
|
||||
def __isub__(self: Self, num: int) -> Self: ...
|
||||
def __iadd__(self, num: int) -> Self: ...
|
||||
def __isub__(self, num: int) -> Self: ...
|
||||
# runtime overrides __contains__ with incompatible type for "other"
|
||||
def __contains__(self, other: BaseIP | _IPNetworkAddr) -> bool: ... # type: ignore[override]
|
||||
def key(self) -> tuple[int, ...]: ...
|
||||
def sort_key(self) -> tuple[int, ...]: ...
|
||||
def ipv4(self: Self) -> Self: ...
|
||||
def ipv6(self: Self, ipv4_compatible: bool = ...) -> Self: ...
|
||||
def previous(self: Self, step: int = ...) -> Self: ...
|
||||
def next(self: Self, step: int = ...) -> Self: ...
|
||||
def ipv4(self) -> Self: ...
|
||||
def ipv6(self, ipv4_compatible: bool = ...) -> Self: ...
|
||||
def previous(self, step: int = ...) -> Self: ...
|
||||
def next(self, step: int = ...) -> Self: ...
|
||||
def supernet(self, prefixlen: int = ...) -> list[IPNetwork]: ...
|
||||
def subnet(self: Self, prefixlen: int, count: int | None = ..., fmt: object | None = ...) -> Iterator[Self]: ...
|
||||
def subnet(self, prefixlen: int, count: int | None = ..., fmt: object | None = ...) -> Iterator[Self]: ...
|
||||
def iter_hosts(self) -> Iterator[IPAddress]: ...
|
||||
|
||||
class IPRange(BaseIP, IPListMixin):
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import NoReturn
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
from netaddr.ip import IPAddress, IPNetwork, IPRange, _IPNetworkAddr
|
||||
|
||||
@@ -19,7 +18,7 @@ class IPSet:
|
||||
def remove(self, addr: IPRange | _IPNetworkAddr | int, flags: int = ...) -> None: ...
|
||||
def pop(self) -> IPNetwork: ...
|
||||
def isdisjoint(self, other: IPSet) -> bool: ...
|
||||
def copy(self: Self) -> Self: ...
|
||||
def copy(self) -> Self: ...
|
||||
def update(self, iterable: _IPIterable, flags: int = ...) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
@@ -30,7 +29,7 @@ class IPSet:
|
||||
def __gt__(self, other: IPSet) -> bool: ...
|
||||
def issuperset(self, other: IPSet) -> bool: ...
|
||||
__ge__ = issuperset
|
||||
def union(self: Self, other: IPSet) -> Self: ...
|
||||
def union(self, other: IPSet) -> Self: ...
|
||||
__or__ = union
|
||||
def intersection(self, other: IPSet) -> IPSet: ...
|
||||
__and__ = intersection
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from _typeshed import Self
|
||||
from typing_extensions import Self
|
||||
|
||||
import opentracing
|
||||
|
||||
@@ -8,4 +8,4 @@ class SpanContext(opentracing.SpanContext):
|
||||
def __init__(self, trace_id: int | None = ..., span_id: int | None = ..., baggage: dict[str, str] | None = ...) -> None: ...
|
||||
@property
|
||||
def baggage(self) -> dict[str, str]: ...
|
||||
def with_baggage_item(self: Self, key: str, value: str) -> Self: ...
|
||||
def with_baggage_item(self, key: str, value: str) -> Self: ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..span import Span
|
||||
from ..tracer import Tracer
|
||||
@@ -27,10 +27,10 @@ class MockSpan(Span):
|
||||
def tracer(self) -> MockTracer: ...
|
||||
@property
|
||||
def context(self) -> SpanContext: ...
|
||||
def set_operation_name(self: Self, operation_name: str) -> Self: ...
|
||||
def set_tag(self: Self, key: str, value: str | bool | float) -> Self: ...
|
||||
def log_kv(self: Self, key_values: dict[str, Any], timestamp: float | None = ...) -> Self: ...
|
||||
def set_baggage_item(self: Self, key: str, value: str) -> Self: ...
|
||||
def set_operation_name(self, operation_name: str) -> Self: ...
|
||||
def set_tag(self, key: str, value: str | bool | float) -> Self: ...
|
||||
def log_kv(self, key_values: dict[str, Any], timestamp: float | None = ...) -> Self: ...
|
||||
def set_baggage_item(self, key: str, value: str) -> Self: ...
|
||||
|
||||
class LogData:
|
||||
key_values: dict[str, Any]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from types import TracebackType
|
||||
from typing_extensions import Self
|
||||
|
||||
from .scope_manager import ScopeManager
|
||||
from .span import Span
|
||||
@@ -11,7 +11,7 @@ class Scope:
|
||||
@property
|
||||
def manager(self) -> ScopeManager: ...
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
from .tracer import Tracer
|
||||
|
||||
@@ -15,15 +16,15 @@ class Span:
|
||||
def context(self) -> SpanContext: ...
|
||||
@property
|
||||
def tracer(self) -> Tracer: ...
|
||||
def set_operation_name(self: Self, operation_name: str) -> Self: ...
|
||||
def set_operation_name(self, operation_name: str) -> Self: ...
|
||||
def finish(self, finish_time: float | None = ...) -> None: ...
|
||||
def set_tag(self: Self, key: str, value: str | bool | float) -> Self: ...
|
||||
def log_kv(self: Self, key_values: dict[str, Any], timestamp: float | None = ...) -> Self: ...
|
||||
def set_baggage_item(self: Self, key: str, value: str) -> Self: ...
|
||||
def set_tag(self, key: str, value: str | bool | float) -> Self: ...
|
||||
def log_kv(self, key_values: dict[str, Any], timestamp: float | None = ...) -> Self: ...
|
||||
def set_baggage_item(self, key: str, value: str) -> Self: ...
|
||||
def get_baggage_item(self, key: str) -> str | None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
def log_event(self: Self, event: Any, payload: Incomplete | None = ...) -> Self: ...
|
||||
def log(self: Self, **kwargs: Any) -> Self: ...
|
||||
def log_event(self, event: Any, payload: Incomplete | None = ...) -> Self: ...
|
||||
def log(self, **kwargs: Any) -> Self: ...
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import builtins
|
||||
import ctypes
|
||||
import sys
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
if sys.platform == "win32":
|
||||
def format_system_message(errno: int) -> str | None: ...
|
||||
@@ -34,7 +35,7 @@ if sys.platform == "win32":
|
||||
filemap: Any = ...
|
||||
view: Any = ...
|
||||
def __init__(self, name: str, length: int, security_attributes: Incomplete | None = ...) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def seek(self, pos: int) -> None: ...
|
||||
def write(self, msg: bytes) -> None: ...
|
||||
def read(self, n: int) -> bytes: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Iterable
|
||||
from re import Pattern
|
||||
from typing import IO
|
||||
from typing_extensions import Self
|
||||
|
||||
from paramiko.ssh_exception import ConfigParseError as ConfigParseError, CouldNotCanonicalize as CouldNotCanonicalize
|
||||
|
||||
@@ -12,11 +12,11 @@ class SSHConfig:
|
||||
TOKENS_BY_CONFIG_KEY: dict[str, list[str]]
|
||||
def __init__(self) -> None: ...
|
||||
@classmethod
|
||||
def from_text(cls: type[Self], text: str) -> Self: ...
|
||||
def from_text(cls, text: str) -> Self: ...
|
||||
@classmethod
|
||||
def from_path(cls: type[Self], path: str) -> Self: ...
|
||||
def from_path(cls, path: str) -> Self: ...
|
||||
@classmethod
|
||||
def from_file(cls: type[Self], flo: IO[str]) -> Self: ...
|
||||
def from_file(cls, flo: IO[str]) -> Self: ...
|
||||
def parse(self, file_obj: IO[str]) -> None: ...
|
||||
def lookup(self, hostname: str) -> SSHConfigDict: ...
|
||||
def canonicalize(self, hostname: str, options: SSHConfigDict, domains: Iterable[str]) -> str: ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Iterator, Mapping, MutableMapping
|
||||
from typing_extensions import Self
|
||||
|
||||
from paramiko.pkey import PKey
|
||||
|
||||
@@ -42,5 +42,5 @@ class HostKeyEntry:
|
||||
key: PKey
|
||||
def __init__(self, hostnames: list[str] | None = ..., key: PKey | None = ...) -> None: ...
|
||||
@classmethod
|
||||
def from_line(cls: type[Self], line: str, lineno: int | None = ...) -> Self | None: ...
|
||||
def from_line(cls, line: str, lineno: int | None = ...) -> Self | None: ...
|
||||
def to_line(self) -> str | None: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from re import Pattern
|
||||
from typing import IO
|
||||
from typing_extensions import Self
|
||||
|
||||
from paramiko.message import Message
|
||||
|
||||
@@ -24,9 +24,9 @@ class PKey:
|
||||
def sign_ssh_data(self, data: bytes, algorithm: str | None = ...) -> Message: ...
|
||||
def verify_ssh_sig(self, data: bytes, msg: Message) -> bool: ...
|
||||
@classmethod
|
||||
def from_private_key_file(cls: type[Self], filename: str, password: str | None = ...) -> Self: ...
|
||||
def from_private_key_file(cls, filename: str, password: str | None = ...) -> Self: ...
|
||||
@classmethod
|
||||
def from_private_key(cls: type[Self], file_obj: IO[str], password: str | None = ...) -> Self: ...
|
||||
def from_private_key(cls, file_obj: IO[str], password: str | None = ...) -> Self: ...
|
||||
def write_private_key_file(self, filename: str, password: str | None = ...) -> None: ...
|
||||
def write_private_key(self, file_obj: IO[str], password: str | None = ...) -> None: ...
|
||||
def load_certificate(self, value: Message | str) -> None: ...
|
||||
@@ -37,10 +37,10 @@ class PublicBlob:
|
||||
comment: str
|
||||
def __init__(self, type_: str, blob: bytes, comment: str | None = ...) -> None: ...
|
||||
@classmethod
|
||||
def from_file(cls: type[Self], filename: str) -> Self: ...
|
||||
def from_file(cls, filename: str) -> Self: ...
|
||||
@classmethod
|
||||
def from_string(cls: type[Self], string: str) -> Self: ...
|
||||
def from_string(cls, string: str) -> Self: ...
|
||||
@classmethod
|
||||
def from_message(cls: type[Self], message: Message) -> Self: ...
|
||||
def from_message(cls, message: Message) -> Self: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from os import stat_result
|
||||
from typing_extensions import Self
|
||||
|
||||
class SFTPAttributes:
|
||||
FLAG_SIZE: int
|
||||
@@ -18,5 +18,5 @@ class SFTPAttributes:
|
||||
attr: dict[str, str]
|
||||
def __init__(self) -> None: ...
|
||||
@classmethod
|
||||
def from_stat(cls: type[Self], obj: stat_result, filename: str | None = ...) -> Self: ...
|
||||
def from_stat(cls, obj: stat_result, filename: str | None = ...) -> Self: ...
|
||||
def asbytes(self) -> bytes: ...
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable, Iterator
|
||||
from logging import Logger
|
||||
from typing import IO
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
from paramiko.channel import Channel
|
||||
from paramiko.sftp import BaseSFTP
|
||||
@@ -22,9 +21,7 @@ class SFTPClient(BaseSFTP, ClosingContextManager):
|
||||
logger: Logger
|
||||
def __init__(self, sock: Channel) -> None: ...
|
||||
@classmethod
|
||||
def from_transport(
|
||||
cls: type[Self], t: Transport, window_size: int | None = ..., max_packet_size: int | None = ...
|
||||
) -> Self | None: ...
|
||||
def from_transport(cls, t: Transport, window_size: int | None = ..., max_packet_size: int | None = ...) -> Self | None: ...
|
||||
def close(self) -> None: ...
|
||||
def get_channel(self) -> Channel | None: ...
|
||||
def listdir(self, path: str = ...) -> list[str]: ...
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from _typeshed import Self
|
||||
from hashlib import _Hash
|
||||
from logging import Logger, LogRecord
|
||||
from types import TracebackType
|
||||
from typing import IO, AnyStr, Protocol
|
||||
from typing_extensions import Self
|
||||
|
||||
from paramiko.config import SSHConfig, SSHConfigDict
|
||||
from paramiko.hostkeys import HostKeys
|
||||
@@ -32,7 +32,7 @@ def get_logger(name: str) -> Logger: ...
|
||||
def constant_time_bytes_eq(a: AnyStr, b: AnyStr) -> bool: ...
|
||||
|
||||
class ClosingContextManager:
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import collections.abc
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable, Mapping
|
||||
from re import Pattern
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
from parsimonious.exceptions import ParseError
|
||||
from parsimonious.grammar import Grammar
|
||||
@@ -25,7 +24,7 @@ class Expression(StrAndRepr):
|
||||
name: str
|
||||
identity_tuple: tuple[str]
|
||||
def __init__(self, name: str = ...) -> None: ...
|
||||
def resolve_refs(self: Self, rule_map: Mapping[str, Expression]) -> Self: ...
|
||||
def resolve_refs(self, rule_map: Mapping[str, Expression]) -> Self: ...
|
||||
def parse(self, text: str, pos: int = ...) -> Node: ...
|
||||
def match(self, text: str, pos: int = ...) -> Node: ...
|
||||
def match_core(self, text: str, pos: int, cache: Mapping[tuple[int, int], Node], error: ParseError) -> Node: ...
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from _typeshed import Incomplete, Self, StrOrBytesPath, SupportsItems
|
||||
from _typeshed import Incomplete, StrOrBytesPath, SupportsItems
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
class CryptPolicy:
|
||||
@classmethod
|
||||
@@ -26,9 +27,9 @@ class CryptPolicy:
|
||||
|
||||
class CryptContext:
|
||||
@classmethod
|
||||
def from_string(cls: type[Self], source: str | bytes, section: str = ..., encoding: str = ...) -> Self: ...
|
||||
def from_string(cls, source: str | bytes, section: str = ..., encoding: str = ...) -> Self: ...
|
||||
@classmethod
|
||||
def from_path(cls: type[Self], path: StrOrBytesPath, section: str = ..., encoding: str = ...) -> Self: ...
|
||||
def from_path(cls, path: StrOrBytesPath, section: str = ..., encoding: str = ...) -> Self: ...
|
||||
def copy(self, **kwds: Any) -> CryptContext: ...
|
||||
def using(self, **kwds: Any) -> CryptContext: ...
|
||||
def replace(self, **kwds): ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Self
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
from passlib.utils.handlers import PrefixWrapper
|
||||
@@ -13,7 +13,7 @@ class Pbkdf2DigestHandler(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.Gen
|
||||
max_rounds: ClassVar[int]
|
||||
rounds_cost: ClassVar[str]
|
||||
@classmethod
|
||||
def from_string(cls: type[Self], hash: str | bytes) -> Self: ... # type: ignore[override]
|
||||
def from_string(cls, hash: str | bytes) -> Self: ... # type: ignore[override]
|
||||
|
||||
# dynamically created by create_pbkdf2_hash()
|
||||
class pbkdf2_sha1(Pbkdf2DigestHandler):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Self
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
@@ -17,4 +17,4 @@ class phpass(uh.HasManyIdents, uh.HasRounds, uh.HasSalt, uh.GenericHandler): #
|
||||
ident_values: ClassVar[tuple[str, ...]]
|
||||
ident_aliases: ClassVar[dict[str, str]]
|
||||
@classmethod
|
||||
def from_string(cls: type[Self], hash: str | bytes) -> Self: ... # type: ignore[override]
|
||||
def from_string(cls, hash: str | bytes) -> Self: ... # type: ignore[override]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Self
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
@@ -18,6 +18,6 @@ class sha1_crypt(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler
|
||||
max_rounds: ClassVar[int]
|
||||
rounds_cost: ClassVar[str]
|
||||
@classmethod
|
||||
def from_string(cls: type[Self], hash: str | bytes) -> Self: ... # type: ignore[override]
|
||||
def from_string(cls, hash: str | bytes) -> Self: ... # type: ignore[override]
|
||||
def to_string(self, config: bool = ...) -> str: ...
|
||||
backends: ClassVar[tuple[str, ...]]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Self
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
@@ -13,7 +13,7 @@ class _SHA2_Common(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandl
|
||||
implicit_rounds: bool
|
||||
def __init__(self, implicit_rounds: bool | None = ..., **kwds) -> None: ...
|
||||
@classmethod
|
||||
def from_string(cls: type[Self], hash: str | bytes) -> Self: ... # type: ignore[override]
|
||||
def from_string(cls, hash: str | bytes) -> Self: ... # type: ignore[override]
|
||||
backends: ClassVar[tuple[str, ...]]
|
||||
|
||||
class sha256_crypt(_SHA2_Common):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Self
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
@@ -20,5 +20,5 @@ class sun_md5_crypt(uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignor
|
||||
@classmethod
|
||||
def identify(cls, hash): ...
|
||||
@classmethod
|
||||
def from_string(cls: type[Self], hash: str | bytes) -> Self: ... # type: ignore[override]
|
||||
def from_string(cls, hash: str | bytes) -> Self: ... # type: ignore[override]
|
||||
def to_string(self, _withchk: bool = ...) -> str: ...
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing_extensions import Literal, Self
|
||||
|
||||
class PasswordHash(metaclass=ABCMeta):
|
||||
is_disabled: ClassVar[bool]
|
||||
@@ -18,7 +17,7 @@ class PasswordHash(metaclass=ABCMeta):
|
||||
def verify(cls, secret: str | bytes, hash: str | bytes, **context_kwds): ...
|
||||
@classmethod
|
||||
@abstractmethod
|
||||
def using(cls: type[Self], relaxed: bool = ..., **kwds: Any) -> type[Self]: ...
|
||||
def using(cls, relaxed: bool = ..., **kwds: Any) -> type[Self]: ...
|
||||
@classmethod
|
||||
def needs_update(cls, hash: str, secret: str | bytes | None = ...) -> bool: ...
|
||||
@classmethod
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import abc
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Self
|
||||
|
||||
from passlib.ifc import PasswordHash
|
||||
from passlib.utils.binary import BASE64_CHARS, HASH64_CHARS, LOWER_HEX_CHARS, PADDED_BASE64_CHARS, UPPER_HEX_CHARS
|
||||
@@ -20,13 +21,13 @@ def render_mc3(ident, rounds, salt, checksum, sep=..., rounds_base: int = ...):
|
||||
|
||||
class MinimalHandler(PasswordHash, metaclass=abc.ABCMeta):
|
||||
@classmethod
|
||||
def using(cls: Self, relaxed: bool = ...) -> type[Self]: ... # type: ignore[override]
|
||||
def using(cls, relaxed: bool = ...) -> type[Self]: ... # type: ignore[override]
|
||||
|
||||
class TruncateMixin(MinimalHandler, metaclass=abc.ABCMeta):
|
||||
truncate_error: ClassVar[bool]
|
||||
truncate_verify_reject: ClassVar[bool]
|
||||
@classmethod
|
||||
def using(cls: type[Self], truncate_error: object = ..., *, relaxed: bool = ...) -> type[Self]: ... # type: ignore[override]
|
||||
def using(cls, truncate_error: object = ..., *, relaxed: bool = ...) -> type[Self]: ... # type: ignore[override]
|
||||
|
||||
class GenericHandler(MinimalHandler):
|
||||
setting_kwds: ClassVar[tuple[str, ...]]
|
||||
@@ -40,7 +41,7 @@ class GenericHandler(MinimalHandler):
|
||||
@classmethod
|
||||
def identify(cls, hash: str | bytes) -> bool: ...
|
||||
@classmethod
|
||||
def from_string(cls: type[Self], hash: str | bytes, **context: Any) -> Self: ...
|
||||
def from_string(cls, hash: str | bytes, **context: Any) -> Self: ...
|
||||
def to_string(self) -> str: ...
|
||||
@classmethod
|
||||
def hash(cls, secret: str | bytes, **kwds: Any) -> str: ...
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import itertools
|
||||
import logging
|
||||
import threading
|
||||
from _typeshed import Incomplete, Self, SupportsKeysAndGetItem
|
||||
from _typeshed import Incomplete, SupportsKeysAndGetItem
|
||||
from collections.abc import Generator, Iterable
|
||||
from typing import ClassVar, NamedTuple, TypeVar
|
||||
from typing_extensions import Self
|
||||
|
||||
class NullHandler(logging.Handler):
|
||||
def emit(self, record) -> None: ...
|
||||
@@ -21,7 +22,7 @@ class attrdict(dict[str, _VT]):
|
||||
def __getattr__(self, attr: str) -> _VT: ...
|
||||
def __setattr__(self, attr: str, value: _VT) -> None: ...
|
||||
# calls dict.update()
|
||||
def __iadd__(self: Self, rhs: SupportsKeysAndGetItem[str, _VT] | Iterable[tuple[str, _VT]]) -> Self: ...
|
||||
def __iadd__(self, rhs: SupportsKeysAndGetItem[str, _VT] | Iterable[tuple[str, _VT]]) -> Self: ...
|
||||
def __add__(self, rhs: SupportsKeysAndGetItem[str, _VT] | Iterable[tuple[str, _VT]]) -> attrdict[_VT]: ...
|
||||
|
||||
OP: Incomplete
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from asyncio import AbstractEventLoop
|
||||
from collections.abc import Callable
|
||||
from logging import Logger
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..connection import Parameters
|
||||
from .base_connection import BaseConnection
|
||||
@@ -11,7 +12,7 @@ LOGGER: Logger
|
||||
|
||||
class AsyncioConnection(BaseConnection):
|
||||
def __init__(
|
||||
self: Self,
|
||||
self,
|
||||
parameters: Parameters | None = ...,
|
||||
on_open_callback: Callable[[Self], object] | None = ...,
|
||||
on_open_error_callback: Callable[[Self, BaseException], object] | None = ...,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import abc
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..adapters.utils import nbio_interface
|
||||
from ..connection import Connection
|
||||
@@ -9,7 +10,7 @@ LOGGER: Incomplete
|
||||
|
||||
class BaseConnection(Connection, metaclass=abc.ABCMeta):
|
||||
def __init__(
|
||||
self: Self,
|
||||
self,
|
||||
parameters,
|
||||
on_open_callback: Callable[[Self], object] | None,
|
||||
on_open_error_callback: Callable[[Self, BaseException], object] | None,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator, Sequence
|
||||
from typing import NamedTuple
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..connection import Parameters
|
||||
from ..data import _ArgumentMapping
|
||||
@@ -55,7 +56,7 @@ class BlockingConnection:
|
||||
def __init__(
|
||||
self, parameters: Parameters | Sequence[Parameters] | None = ..., _impl_class: Incomplete | None = ...
|
||||
) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, exc_type: object, value: object, traceback: object) -> None: ...
|
||||
def add_on_connection_blocked_callback(self, callback) -> None: ...
|
||||
def add_on_connection_unblocked_callback(self, callback) -> None: ...
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
from logging import Logger
|
||||
from typing import Any
|
||||
from typing_extensions import Final
|
||||
from typing_extensions import Final, Self
|
||||
|
||||
from .callback import CallbackManager
|
||||
from .connection import Connection
|
||||
@@ -25,7 +25,7 @@ class Channel:
|
||||
connection: Connection
|
||||
flow_active: bool
|
||||
|
||||
def __init__(self: Self, connection: Connection, channel_number: int, on_open_callback: Callable[[Self], object]) -> None: ...
|
||||
def __init__(self, connection: Connection, channel_number: int, on_open_callback: Callable[[Self], object]) -> None: ...
|
||||
def __int__(self) -> int: ...
|
||||
def add_callback(self, callback, replies, one_shot: bool = ...) -> None: ...
|
||||
def add_on_cancel_callback(self, callback) -> None: ...
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import abc
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
from logging import Logger
|
||||
from typing_extensions import Final
|
||||
from typing_extensions import Final, Self
|
||||
|
||||
from .callback import CallbackManager
|
||||
from .channel import Channel
|
||||
@@ -150,23 +150,21 @@ class Connection(AbstractBase, metaclass=abc.ABCMeta):
|
||||
server_properties: Incomplete
|
||||
known_hosts: Incomplete
|
||||
def __init__(
|
||||
self: Self,
|
||||
self,
|
||||
parameters: Parameters | None = ...,
|
||||
on_open_callback: Callable[[Self], object] | None = ...,
|
||||
on_open_error_callback: Callable[[Self, BaseException], object] | None = ...,
|
||||
on_close_callback: Callable[[Self, BaseException], object] | None = ...,
|
||||
internal_connection_workflow: bool = ...,
|
||||
) -> None: ...
|
||||
def add_on_close_callback(self: Self, callback: Callable[[Self, BaseException], object]) -> None: ...
|
||||
def add_on_connection_blocked_callback(
|
||||
self: Self, callback: Callable[[Self, Method[SpecConnection.Blocked]], object]
|
||||
) -> None: ...
|
||||
def add_on_close_callback(self, callback: Callable[[Self, BaseException], object]) -> None: ...
|
||||
def add_on_connection_blocked_callback(self, callback: Callable[[Self, Method[SpecConnection.Blocked]], object]) -> None: ...
|
||||
def add_on_connection_unblocked_callback(
|
||||
self: Self, callback: Callable[[Self, Method[SpecConnection.Unblocked]], object]
|
||||
self, callback: Callable[[Self, Method[SpecConnection.Unblocked]], object]
|
||||
) -> None: ...
|
||||
def add_on_open_callback(self: Self, callback: Callable[[Self], object]) -> None: ...
|
||||
def add_on_open_callback(self, callback: Callable[[Self], object]) -> None: ...
|
||||
def add_on_open_error_callback(
|
||||
self: Self, callback: Callable[[Self, BaseException], object], remove_default: bool = ...
|
||||
self, callback: Callable[[Self, BaseException], object], remove_default: bool = ...
|
||||
) -> None: ...
|
||||
def channel(
|
||||
self, channel_number: int | None = ..., on_open_callback: Callable[[Channel], object] | None = ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
from .amqp_object import Class, Method, Properties
|
||||
|
||||
@@ -339,7 +339,7 @@ class Exchange(Class):
|
||||
def __init__(self) -> None: ...
|
||||
@property
|
||||
def synchronous(self) -> Literal[False]: ...
|
||||
def decode(self: Self, encoded: bytes, offset: int = ...) -> Self: ...
|
||||
def decode(self, encoded: bytes, offset: int = ...) -> Self: ...
|
||||
def encode(self) -> list[bytes]: ...
|
||||
|
||||
class Delete(Method):
|
||||
@@ -450,7 +450,7 @@ class Queue(Class):
|
||||
) -> None: ...
|
||||
@property
|
||||
def synchronous(self) -> Literal[True]: ...
|
||||
def decode(self: Self, encoded: bytes, offset: int = ...) -> Self: ...
|
||||
def decode(self, encoded: bytes, offset: int = ...) -> Self: ...
|
||||
def encode(self) -> list[bytes]: ...
|
||||
|
||||
class DeclareOk(Method):
|
||||
@@ -461,7 +461,7 @@ class Queue(Class):
|
||||
def __init__(self, queue: _str, message_count: int, consumer_count: int) -> None: ...
|
||||
@property
|
||||
def synchronous(self) -> Literal[False]: ...
|
||||
def decode(self: Self, encoded: bytes, offset: int = ...) -> Self: ...
|
||||
def decode(self, encoded: bytes, offset: int = ...) -> Self: ...
|
||||
def encode(self) -> list[bytes]: ...
|
||||
|
||||
class Bind(Method):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Sequence
|
||||
from typing import Any, TypeVar
|
||||
from typing_extensions import Self
|
||||
|
||||
from .descriptor import Descriptor, FieldDescriptor
|
||||
from .internal.extension_dict import _ExtensionDict, _ExtensionFieldDescriptor
|
||||
@@ -13,11 +13,11 @@ _M = TypeVar("_M", bound=Message) # message type (of self)
|
||||
|
||||
class Message:
|
||||
DESCRIPTOR: Descriptor
|
||||
def __deepcopy__(self: Self, memo: Any = ...) -> Self: ...
|
||||
def __deepcopy__(self, memo: Any = ...) -> Self: ...
|
||||
def __eq__(self, other_msg): ...
|
||||
def __ne__(self, other_msg): ...
|
||||
def MergeFrom(self: Self, other_msg: Self) -> None: ...
|
||||
def CopyFrom(self: Self, other_msg: Self) -> None: ...
|
||||
def MergeFrom(self, other_msg: Self) -> None: ...
|
||||
def CopyFrom(self, other_msg: Self) -> None: ...
|
||||
def Clear(self) -> None: ...
|
||||
def SetInParent(self) -> None: ...
|
||||
def IsInitialized(self) -> bool: ...
|
||||
@@ -34,7 +34,7 @@ class Message:
|
||||
def Extensions(self: _M) -> _ExtensionDict[_M]: ...
|
||||
def ByteSize(self) -> int: ...
|
||||
@classmethod
|
||||
def FromString(cls: type[Self], s: bytes) -> Self: ...
|
||||
def FromString(cls, s: bytes) -> Self: ...
|
||||
# Intentionally left out typing on these three methods, because they are
|
||||
# stringly typed and it is not useful to call them on a Message directly.
|
||||
# We prefer more specific typing on individual subclasses of Message
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import sys
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Iterable, Iterator
|
||||
from contextlib import AbstractContextManager
|
||||
from typing import Any, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
from psutil._common import (
|
||||
AIX as AIX,
|
||||
@@ -217,7 +217,7 @@ class Process:
|
||||
|
||||
class Popen(Process):
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args, **kwargs) -> None: ...
|
||||
def __getattribute__(self, name: str) -> Any: ...
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable, Iterable, Mapping, Sequence
|
||||
from types import TracebackType
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
import psycopg2
|
||||
import psycopg2.extensions
|
||||
@@ -105,11 +104,11 @@ class cursor:
|
||||
def scroll(self, value, mode=...): ...
|
||||
def setinputsizes(self, sizes): ...
|
||||
def setoutputsize(self, size, column=...): ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
def __iter__(self) -> Self: ...
|
||||
def __next__(self) -> tuple[Any, ...]: ...
|
||||
|
||||
_Cursor: TypeAlias = cursor
|
||||
@@ -462,7 +461,7 @@ class connection:
|
||||
def tpc_recover(self) -> list[Xid]: ...
|
||||
def tpc_rollback(self, __xid: str | bytes | Xid = ...) -> None: ...
|
||||
def xid(self, format_id, gtrid, bqual) -> Xid: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, __type: object, __name: object, __tb: object) -> None: ...
|
||||
|
||||
class lobject:
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
from _typeshed import Self
|
||||
from datetime import datetime, timedelta, tzinfo
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
class FixedOffset(tzinfo):
|
||||
def __init__(self, hours: float, minutes: float) -> None: ...
|
||||
def dst(self, dt: datetime | None) -> timedelta: ...
|
||||
def utcoffset(self, dt: datetime | None) -> timedelta: ...
|
||||
def tzname(self, dt: datetime | None) -> str: ...
|
||||
def __deepcopy__(self: Self, memo: dict[int, Any]) -> Self: ...
|
||||
def __deepcopy__(self, memo: dict[int, Any]) -> Self: ...
|
||||
|
||||
def timedelta_seconds(td: timedelta) -> int: ...
|
||||
def timezone(utcoffset: float) -> str: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Incomplete, ReadableBuffer, Self, SupportsRichComparison, SupportsTrunc
|
||||
from _typeshed import Incomplete, ReadableBuffer, SupportsRichComparison, SupportsTrunc
|
||||
from collections.abc import Callable, Generator
|
||||
from typing import SupportsInt
|
||||
from typing_extensions import SupportsIndex, TypeAlias
|
||||
from typing_extensions import Self, SupportsIndex, TypeAlias
|
||||
|
||||
from pyasn1.type import base, constraint, namedtype, namedval
|
||||
from pyasn1.type.tag import TagSet
|
||||
@@ -34,7 +34,7 @@ class Integer(base.SimpleAsn1Type):
|
||||
def __mod__(self, value): ...
|
||||
def __rmod__(self, value): ...
|
||||
# Accepts everything builtins.pow does
|
||||
def __pow__(self: Self, value: complex, modulo: int | None = ...) -> Self: ...
|
||||
def __pow__(self, value: complex, modulo: int | None = ...) -> Self: ...
|
||||
def __rpow__(self, value): ...
|
||||
def __floordiv__(self, value): ...
|
||||
def __rfloordiv__(self, value): ...
|
||||
@@ -190,7 +190,7 @@ class Real(base.SimpleAsn1Type):
|
||||
def __mod__(self, value): ...
|
||||
def __rmod__(self, value): ...
|
||||
# Accepts everything builtins.pow with a float base does
|
||||
def __pow__(self: Self, value: complex, modulo: int | None = ...) -> Self: ...
|
||||
def __pow__(self, value: complex, modulo: int | None = ...) -> Self: ...
|
||||
def __rpow__(self, value): ...
|
||||
def __truediv__(self, value): ...
|
||||
def __rtruediv__(self, value): ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import Incomplete, Self
|
||||
from typing_extensions import final
|
||||
from _typeshed import Incomplete
|
||||
from typing_extensions import Self, final
|
||||
|
||||
version: str
|
||||
|
||||
@@ -27,7 +27,7 @@ class Curl:
|
||||
def unsetopt(self, option: int) -> Incomplete: ...
|
||||
def pause(self, bitmask: Incomplete) -> Incomplete: ...
|
||||
def errstr(self) -> str: ...
|
||||
def duphandle(self: Self) -> Self: ...
|
||||
def duphandle(self) -> Self: ...
|
||||
def errstr_raw(self) -> bytes: ...
|
||||
def set_ca_certs(self, __value: bytes | str) -> None: ...
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable
|
||||
from types import TracebackType
|
||||
from typing import TypeVar
|
||||
from typing_extensions import ParamSpec
|
||||
from typing_extensions import ParamSpec, Self
|
||||
|
||||
_AC = TypeVar("_AC", bound=Callable[..., object])
|
||||
_R = TypeVar("_R")
|
||||
@@ -10,7 +9,7 @@ _P = ParamSpec("_P")
|
||||
|
||||
class Python:
|
||||
def __init__(self, strict_mode: bool | None = None) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import sys
|
||||
import threading
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable
|
||||
from queue import Queue
|
||||
from types import ModuleType, TracebackType
|
||||
from typing import Any, ClassVar, Generic, TypeVar
|
||||
from typing_extensions import ParamSpec, TypedDict
|
||||
from typing_extensions import ParamSpec, Self, TypedDict
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_AbstractListener_T = TypeVar("_AbstractListener_T", bound=AbstractListener)
|
||||
@@ -37,7 +36,7 @@ class AbstractListener(threading.Thread):
|
||||
@property
|
||||
def running(self) -> bool: ...
|
||||
def stop(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
@@ -60,11 +59,11 @@ class Events(Generic[_T, _AbstractListener_T]):
|
||||
_listener: _AbstractListener_T # undocumented
|
||||
start: Callable[[], None]
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
def __iter__(self) -> Self: ...
|
||||
def __next__(self) -> _T: ...
|
||||
def get(self, timeout: float | None = ...) -> _T | None: ...
|
||||
def _event_mapper(self, event: Callable[_P, object]) -> Callable[_P, None]: ...
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import contextlib
|
||||
import enum
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable, Iterable, Iterator
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Self
|
||||
|
||||
from pynput._util import AbstractListener
|
||||
|
||||
@@ -16,13 +16,13 @@ class KeyCode:
|
||||
def __init__(self, vk: str | None = ..., char: str | None = ..., is_dead: bool = ..., **kwargs: str) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def join(self: Self, key: Self) -> Self: ...
|
||||
def join(self, key: Self) -> Self: ...
|
||||
@classmethod
|
||||
def from_vk(cls: type[Self], vk: int, **kwargs: Any) -> Self: ...
|
||||
def from_vk(cls, vk: int, **kwargs: Any) -> Self: ...
|
||||
@classmethod
|
||||
def from_char(cls: type[Self], char: str, **kwargs: Any) -> Self: ...
|
||||
def from_char(cls, char: str, **kwargs: Any) -> Self: ...
|
||||
@classmethod
|
||||
def from_dead(cls: type[Self], char: str, **kwargs: Any) -> Self: ...
|
||||
def from_dead(cls, char: str, **kwargs: Any) -> Self: ...
|
||||
|
||||
class Key(enum.Enum):
|
||||
alt: int
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import enum
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
from pynput._util import AbstractListener
|
||||
|
||||
@@ -55,7 +55,7 @@ class Controller:
|
||||
def release(self, button: Button) -> None: ...
|
||||
def move(self, dx: int, dy: int) -> None: ...
|
||||
def click(self, button: Button, count: int = ...) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import threading
|
||||
from _typeshed import ReadableBuffer, Self
|
||||
from _typeshed import ReadableBuffer
|
||||
from collections.abc import Callable
|
||||
from typing_extensions import Self
|
||||
|
||||
from serial import Serial
|
||||
|
||||
@@ -39,6 +40,6 @@ class ReaderThread(threading.Thread):
|
||||
def stop(self) -> None: ...
|
||||
def write(self, data: ReadableBuffer) -> int: ...
|
||||
def close(self) -> None: ...
|
||||
def connect(self: Self) -> tuple[Self, Protocol]: ...
|
||||
def connect(self) -> tuple[Self, Protocol]: ...
|
||||
def __enter__(self) -> Protocol: ...
|
||||
def __exit__(self, __exc_type: object, __exc_val: object, __exc_tb: object) -> None: ...
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import codecs
|
||||
import sys
|
||||
import threading
|
||||
from _typeshed import Self
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, BinaryIO, TextIO
|
||||
from typing_extensions import Self
|
||||
|
||||
from serial import Serial
|
||||
|
||||
@@ -19,7 +19,7 @@ class ConsoleBase:
|
||||
def write_bytes(self, byte_string: bytes) -> None: ...
|
||||
def write(self, text: str) -> None: ...
|
||||
def cancel(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: object, **kwargs: object) -> None: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable, Sequence
|
||||
from contextlib import AbstractContextManager
|
||||
from stat import S_IMODE as S_IMODE
|
||||
from types import TracebackType
|
||||
from typing import IO
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
import paramiko
|
||||
from paramiko import AuthenticationException as AuthenticationException
|
||||
@@ -123,7 +122,7 @@ class Connection:
|
||||
@property
|
||||
def remote_server_key(self) -> paramiko.PKey: ...
|
||||
def __del__(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, etype: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from _typeshed import Self, StrOrBytesPath
|
||||
from _typeshed import StrOrBytesPath
|
||||
from codecs import StreamReaderWriter
|
||||
from collections.abc import Generator, Iterator
|
||||
from types import TracebackType
|
||||
from typing_extensions import Self
|
||||
|
||||
MATCHER: str
|
||||
|
||||
@@ -12,7 +13,7 @@ class LogReader:
|
||||
read: int
|
||||
pipe: StreamReaderWriter | None
|
||||
def __init__(self, filename: StrOrBytesPath, mass: int = ...) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, error_type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import re
|
||||
import subprocess
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from builtins import range as _range
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Callable, Generator, Iterable, Iterator
|
||||
@@ -8,7 +8,7 @@ from datetime import datetime
|
||||
from logging import Logger
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import SupportsIndex, TypeAlias
|
||||
from typing_extensions import Self, SupportsIndex, TypeAlias
|
||||
|
||||
from cronlog import CronLog
|
||||
|
||||
@@ -46,7 +46,7 @@ class CronTab:
|
||||
def __init__(
|
||||
self, user: _User = ..., tab: str | None = ..., tabfile: str | None = ..., log: CronLog | str | None = ...
|
||||
) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
@@ -115,7 +115,7 @@ class CronItem:
|
||||
def __hash__(self) -> int: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
@classmethod
|
||||
def from_line(cls: type[Self], line: str, user: str | None = ..., cron: Incomplete | None = ...) -> Self: ...
|
||||
def from_line(cls, line: str, user: str | None = ..., cron: Incomplete | None = ...) -> Self: ...
|
||||
def delete(self) -> None: ...
|
||||
def set_command(self, cmd: str, parse_stdin: bool = ...) -> None: ...
|
||||
def set_comment(self, cmt: str, pre_comment: bool = ...) -> None: ...
|
||||
@@ -257,5 +257,5 @@ class OrderedVariableList(OrderedDict[Incomplete, Incomplete]):
|
||||
def __init__(self, *args: Any, **kw: Any) -> None: ...
|
||||
@property
|
||||
def previous(self) -> Incomplete: ...
|
||||
def all(self: Self) -> Self: ...
|
||||
def all(self) -> Self: ...
|
||||
def __getitem__(self, key: Incomplete) -> Incomplete: ...
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from _typeshed import Self
|
||||
from typing_extensions import Self
|
||||
|
||||
class weekday:
|
||||
def __init__(self, weekday: int, n: int | None = ...) -> None: ...
|
||||
def __call__(self: Self, n: int) -> Self: ...
|
||||
def __call__(self, n: int) -> Self: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
weekday: int
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user