mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Add mypy error codes to type: ignores, remove unused ignores (#7504)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -337,7 +337,7 @@ class unicode(basestring, Sequence[unicode]):
|
||||
def __ge__(self, x: unicode) -> bool: ...
|
||||
def __len__(self) -> int: ...
|
||||
# The argument type is incompatible with Sequence
|
||||
def __contains__(self, s: unicode | bytes) -> bool: ... # type: ignore
|
||||
def __contains__(self, s: unicode | bytes) -> bool: ... # type: ignore[override]
|
||||
def __iter__(self) -> Iterator[unicode]: ...
|
||||
def __int__(self) -> int: ...
|
||||
def __float__(self) -> float: ...
|
||||
@@ -415,7 +415,7 @@ class str(Sequence[str], basestring):
|
||||
def zfill(self, __width: int) -> str: ...
|
||||
def __add__(self, s: AnyStr) -> AnyStr: ...
|
||||
# Incompatible with Sequence.__contains__
|
||||
def __contains__(self, o: str | Text) -> bool: ... # type: ignore
|
||||
def __contains__(self, o: str | Text) -> bool: ... # type: ignore[override]
|
||||
def __eq__(self, x: object) -> bool: ...
|
||||
def __ge__(self, x: Text) -> bool: ...
|
||||
def __getitem__(self, i: int | slice) -> str: ...
|
||||
@@ -491,7 +491,7 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def __iter__(self) -> Iterator[int]: ...
|
||||
def __int__(self) -> int: ...
|
||||
def __float__(self) -> float: ...
|
||||
__hash__: ClassVar[None] # type: ignore
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
@overload
|
||||
def __getitem__(self, i: int) -> int: ...
|
||||
@overload
|
||||
@@ -507,7 +507,7 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def __add__(self, s: bytes) -> bytearray: ...
|
||||
def __mul__(self, n: int) -> bytearray: ...
|
||||
# Incompatible with Sequence.__contains__
|
||||
def __contains__(self, o: int | bytes) -> bool: ... # type: ignore
|
||||
def __contains__(self, o: int | bytes) -> bool: ... # type: ignore[override]
|
||||
def __eq__(self, x: object) -> bool: ...
|
||||
def __ne__(self, x: object) -> bool: ...
|
||||
def __lt__(self, x: bytes) -> bool: ...
|
||||
@@ -575,7 +575,7 @@ class slice(object):
|
||||
def __init__(self, stop: Any) -> None: ...
|
||||
@overload
|
||||
def __init__(self, start: Any, stop: Any, step: Any = ...) -> None: ...
|
||||
__hash__: ClassVar[None] # type: ignore
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
def indices(self, len: int) -> tuple[int, int, int]: ...
|
||||
|
||||
class tuple(Sequence[_T_co], Generic[_T_co]):
|
||||
@@ -622,7 +622,7 @@ class list(MutableSequence[_T], Generic[_T]):
|
||||
def sort(self, cmp: Callable[[_T, _T], Any] = ..., key: Callable[[_T], Any] = ..., reverse: bool = ...) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[_T]: ...
|
||||
__hash__: ClassVar[None] # type: ignore
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
@overload
|
||||
def __getitem__(self, i: int) -> _T: ...
|
||||
@overload
|
||||
@@ -684,7 +684,7 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
def __setitem__(self, k: _KT, v: _VT) -> None: ...
|
||||
def __delitem__(self, v: _KT) -> None: ...
|
||||
def __iter__(self) -> Iterator[_KT]: ...
|
||||
__hash__: ClassVar[None] # type: ignore
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
|
||||
class set(MutableSet[_T], Generic[_T]):
|
||||
def __init__(self, iterable: Iterable[_T] = ...) -> None: ...
|
||||
@@ -726,7 +726,7 @@ class set(MutableSet[_T], Generic[_T]):
|
||||
def __lt__(self, s: AbstractSet[object]) -> bool: ...
|
||||
def __ge__(self, s: AbstractSet[object]) -> bool: ...
|
||||
def __gt__(self, s: AbstractSet[object]) -> bool: ...
|
||||
__hash__: ClassVar[None] # type: ignore
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
|
||||
class frozenset(AbstractSet[_T_co], Generic[_T_co]):
|
||||
def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ...
|
||||
@@ -785,10 +785,10 @@ class property(object):
|
||||
|
||||
long = int
|
||||
|
||||
class _NotImplementedType(Any): # type: ignore
|
||||
class _NotImplementedType(Any): # type: ignore[misc]
|
||||
# A little weird, but typing the __call__ as NotImplemented makes the error message
|
||||
# for NotImplemented() much better
|
||||
__call__: NotImplemented # type: ignore
|
||||
__call__: NotImplemented # type: ignore[valid-type]
|
||||
|
||||
NotImplemented: _NotImplementedType
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ if sys.platform == "win32":
|
||||
def Modify(self, mode: int, record: _Record) -> None: ...
|
||||
def Close(self) -> None: ...
|
||||
# Don't exist at runtime
|
||||
__new__: None # type: ignore
|
||||
__init__: None # type: ignore
|
||||
__new__: None # type: ignore[assignment]
|
||||
__init__: None # type: ignore[assignment]
|
||||
# Actual typename Summary, not exposed by the implementation
|
||||
class _Summary:
|
||||
def GetProperty(self, propid: int) -> str | bytes | None: ...
|
||||
@@ -19,8 +19,8 @@ if sys.platform == "win32":
|
||||
def SetProperty(self, propid: int, value: str | bytes) -> None: ...
|
||||
def Persist(self) -> None: ...
|
||||
# Don't exist at runtime
|
||||
__new__: None # type: ignore
|
||||
__init__: None # type: ignore
|
||||
__new__: None # type: ignore[assignment]
|
||||
__init__: None # type: ignore[assignment]
|
||||
# Actual typename Database, not exposed by the implementation
|
||||
class _Database:
|
||||
def OpenView(self, sql: str) -> _View: ...
|
||||
@@ -28,8 +28,8 @@ if sys.platform == "win32":
|
||||
def GetSummaryInformation(self, updateCount: int) -> _Summary: ...
|
||||
def Close(self) -> None: ...
|
||||
# Don't exist at runtime
|
||||
__new__: None # type: ignore
|
||||
__init__: None # type: ignore
|
||||
__new__: None # type: ignore[assignment]
|
||||
__init__: None # type: ignore[assignment]
|
||||
# Actual typename Record, not exposed by the implementation
|
||||
class _Record:
|
||||
def GetFieldCount(self) -> int: ...
|
||||
@@ -40,8 +40,8 @@ if sys.platform == "win32":
|
||||
def SetInteger(self, field: int, int: int) -> None: ...
|
||||
def ClearData(self) -> None: ...
|
||||
# Don't exist at runtime
|
||||
__new__: None # type: ignore
|
||||
__init__: None # type: ignore
|
||||
__new__: None # type: ignore[assignment]
|
||||
__init__: None # type: ignore[assignment]
|
||||
def UuidCreate() -> str: ...
|
||||
def FCICreate(cabname: str, files: list[str]) -> None: ...
|
||||
def OpenDatabase(name: str, flags: int) -> _Database: ...
|
||||
|
||||
@@ -107,11 +107,11 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
|
||||
@overload
|
||||
def parse_args(self, args: Sequence[Text] | None = ...) -> Namespace: ...
|
||||
@overload
|
||||
def parse_args(self, args: Sequence[Text] | None, namespace: None) -> Namespace: ... # type: ignore
|
||||
def parse_args(self, args: Sequence[Text] | None, namespace: None) -> Namespace: ... # type: ignore[misc]
|
||||
@overload
|
||||
def parse_args(self, args: Sequence[Text] | None, namespace: _N) -> _N: ...
|
||||
@overload
|
||||
def parse_args(self, *, namespace: None) -> Namespace: ... # type: ignore
|
||||
def parse_args(self, *, namespace: None) -> Namespace: ... # type: ignore[misc]
|
||||
@overload
|
||||
def parse_args(self, *, namespace: _N) -> _N: ...
|
||||
def add_subparsers(
|
||||
|
||||
@@ -28,7 +28,7 @@ class array(MutableSequence[_T], Generic[_T]):
|
||||
def fromfile(self, __f: BinaryIO, __n: int) -> None: ...
|
||||
def fromlist(self, __list: list[_T]) -> None: ...
|
||||
def fromunicode(self, __ustr: str) -> None: ...
|
||||
def index(self, __v: _T) -> int: ... # type: ignore # Overrides Sequence
|
||||
def index(self, __v: _T) -> int: ... # Overrides Sequence
|
||||
def insert(self, __i: int, __v: _T) -> None: ...
|
||||
def pop(self, __i: int = ...) -> _T: ...
|
||||
def read(self, f: BinaryIO, n: int) -> None: ...
|
||||
@@ -45,7 +45,7 @@ class array(MutableSequence[_T], Generic[_T]):
|
||||
def __getitem__(self, i: int) -> _T: ...
|
||||
@overload
|
||||
def __getitem__(self, s: slice) -> array[_T]: ...
|
||||
@overload # type: ignore # Overrides MutableSequence
|
||||
@overload # type: ignore[override]
|
||||
def __setitem__(self, i: int, o: _T) -> None: ...
|
||||
@overload
|
||||
def __setitem__(self, s: slice, o: array[_T]) -> None: ...
|
||||
|
||||
@@ -337,7 +337,7 @@ class unicode(basestring, Sequence[unicode]):
|
||||
def __ge__(self, x: unicode) -> bool: ...
|
||||
def __len__(self) -> int: ...
|
||||
# The argument type is incompatible with Sequence
|
||||
def __contains__(self, s: unicode | bytes) -> bool: ... # type: ignore
|
||||
def __contains__(self, s: unicode | bytes) -> bool: ... # type: ignore[override]
|
||||
def __iter__(self) -> Iterator[unicode]: ...
|
||||
def __int__(self) -> int: ...
|
||||
def __float__(self) -> float: ...
|
||||
@@ -415,7 +415,7 @@ class str(Sequence[str], basestring):
|
||||
def zfill(self, __width: int) -> str: ...
|
||||
def __add__(self, s: AnyStr) -> AnyStr: ...
|
||||
# Incompatible with Sequence.__contains__
|
||||
def __contains__(self, o: str | Text) -> bool: ... # type: ignore
|
||||
def __contains__(self, o: str | Text) -> bool: ... # type: ignore[override]
|
||||
def __eq__(self, x: object) -> bool: ...
|
||||
def __ge__(self, x: Text) -> bool: ...
|
||||
def __getitem__(self, i: int | slice) -> str: ...
|
||||
@@ -491,7 +491,7 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def __iter__(self) -> Iterator[int]: ...
|
||||
def __int__(self) -> int: ...
|
||||
def __float__(self) -> float: ...
|
||||
__hash__: ClassVar[None] # type: ignore
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
@overload
|
||||
def __getitem__(self, i: int) -> int: ...
|
||||
@overload
|
||||
@@ -507,7 +507,7 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def __add__(self, s: bytes) -> bytearray: ...
|
||||
def __mul__(self, n: int) -> bytearray: ...
|
||||
# Incompatible with Sequence.__contains__
|
||||
def __contains__(self, o: int | bytes) -> bool: ... # type: ignore
|
||||
def __contains__(self, o: int | bytes) -> bool: ... # type: ignore[override]
|
||||
def __eq__(self, x: object) -> bool: ...
|
||||
def __ne__(self, x: object) -> bool: ...
|
||||
def __lt__(self, x: bytes) -> bool: ...
|
||||
@@ -575,7 +575,7 @@ class slice(object):
|
||||
def __init__(self, stop: Any) -> None: ...
|
||||
@overload
|
||||
def __init__(self, start: Any, stop: Any, step: Any = ...) -> None: ...
|
||||
__hash__: ClassVar[None] # type: ignore
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
def indices(self, len: int) -> tuple[int, int, int]: ...
|
||||
|
||||
class tuple(Sequence[_T_co], Generic[_T_co]):
|
||||
@@ -622,7 +622,7 @@ class list(MutableSequence[_T], Generic[_T]):
|
||||
def sort(self, cmp: Callable[[_T, _T], Any] = ..., key: Callable[[_T], Any] = ..., reverse: bool = ...) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[_T]: ...
|
||||
__hash__: ClassVar[None] # type: ignore
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
@overload
|
||||
def __getitem__(self, i: int) -> _T: ...
|
||||
@overload
|
||||
@@ -684,7 +684,7 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
def __setitem__(self, k: _KT, v: _VT) -> None: ...
|
||||
def __delitem__(self, v: _KT) -> None: ...
|
||||
def __iter__(self) -> Iterator[_KT]: ...
|
||||
__hash__: ClassVar[None] # type: ignore
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
|
||||
class set(MutableSet[_T], Generic[_T]):
|
||||
def __init__(self, iterable: Iterable[_T] = ...) -> None: ...
|
||||
@@ -726,7 +726,7 @@ class set(MutableSet[_T], Generic[_T]):
|
||||
def __lt__(self, s: AbstractSet[object]) -> bool: ...
|
||||
def __ge__(self, s: AbstractSet[object]) -> bool: ...
|
||||
def __gt__(self, s: AbstractSet[object]) -> bool: ...
|
||||
__hash__: ClassVar[None] # type: ignore
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
|
||||
class frozenset(AbstractSet[_T_co], Generic[_T_co]):
|
||||
def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ...
|
||||
@@ -785,10 +785,10 @@ class property(object):
|
||||
|
||||
long = int
|
||||
|
||||
class _NotImplementedType(Any): # type: ignore
|
||||
class _NotImplementedType(Any): # type: ignore[misc]
|
||||
# A little weird, but typing the __call__ as NotImplemented makes the error message
|
||||
# for NotImplemented() much better
|
||||
__call__: NotImplemented # type: ignore
|
||||
__call__: NotImplemented # type: ignore[valid-type]
|
||||
|
||||
NotImplemented: _NotImplementedType
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class BZ2File(io.BufferedIOBase, IO[bytes]):
|
||||
def __init__(self, filename: _PathOrFile, mode: str = ..., buffering: Any | None = ..., compresslevel: int = ...) -> None: ...
|
||||
def read(self, size: int | None = ...) -> bytes: ...
|
||||
def read1(self, size: int = ...) -> bytes: ...
|
||||
def readline(self, size: SupportsIndex = ...) -> bytes: ... # type: ignore
|
||||
def readline(self, size: SupportsIndex = ...) -> bytes: ... # type: ignore[override]
|
||||
def readinto(self, b: WriteableBuffer) -> int: ...
|
||||
def readlines(self, size: SupportsIndex = ...) -> list[bytes]: ...
|
||||
def seek(self, offset: int, whence: int = ...) -> int: ...
|
||||
|
||||
@@ -55,11 +55,11 @@ _BytesToBytesEncodingT = Literal[
|
||||
@overload
|
||||
def encode(obj: bytes, encoding: _BytesToBytesEncodingT, errors: str = ...) -> bytes: ...
|
||||
@overload
|
||||
def encode(obj: str, encoding: Literal["rot13", "rot_13"] = ..., errors: str = ...) -> str: ... # type: ignore
|
||||
def encode(obj: str, encoding: Literal["rot13", "rot_13"] = ..., errors: str = ...) -> str: ...
|
||||
@overload
|
||||
def encode(obj: _Decoded, encoding: str = ..., errors: str = ...) -> _Encoded: ...
|
||||
@overload
|
||||
def decode(obj: bytes, encoding: _BytesToBytesEncodingT, errors: str = ...) -> bytes: ... # type: ignore
|
||||
def decode(obj: bytes, encoding: _BytesToBytesEncodingT, errors: str = ...) -> bytes: ... # type: ignore[misc]
|
||||
@overload
|
||||
def decode(obj: str, encoding: Literal["rot13", "rot_13"] = ..., errors: str = ...) -> Text: ...
|
||||
@overload
|
||||
@@ -243,7 +243,7 @@ class StreamRecoder(BinaryIO):
|
||||
def next(self) -> bytes: ...
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
def write(self, data: bytes) -> int: ...
|
||||
def writelines(self, list: Iterable[bytes]) -> int: ... # type: ignore # it's supposed to return None
|
||||
def writelines(self, list: Iterable[bytes]) -> int: ... # type: ignore[override] # it's supposed to return None
|
||||
def reset(self) -> None: ...
|
||||
def __getattr__(self, name: str) -> Any: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
|
||||
@@ -67,8 +67,8 @@ class _CDataMeta(type):
|
||||
# By default mypy complains about the following two methods, because strictly speaking cls
|
||||
# might not be a Type[_CT]. However this can never actually happen, because the only class that
|
||||
# uses _CDataMeta as its metaclass is _CData. So it's safe to ignore the errors here.
|
||||
def __mul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore
|
||||
def __rmul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore
|
||||
def __mul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore[misc]
|
||||
def __rmul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore[misc]
|
||||
|
||||
class _CData(metaclass=_CDataMeta):
|
||||
_b_base: int = ...
|
||||
|
||||
@@ -214,13 +214,13 @@ class datetime(date):
|
||||
def utcoffset(self) -> timedelta | None: ...
|
||||
def tzname(self) -> str | None: ...
|
||||
def dst(self) -> timedelta | None: ...
|
||||
def __le__(self, other: datetime) -> bool: ... # type: ignore
|
||||
def __lt__(self, other: datetime) -> bool: ... # type: ignore
|
||||
def __ge__(self, other: datetime) -> bool: ... # type: ignore
|
||||
def __gt__(self, other: datetime) -> bool: ... # type: ignore
|
||||
def __le__(self, other: datetime) -> bool: ... # type: ignore[override]
|
||||
def __lt__(self, other: datetime) -> bool: ... # type: ignore[override]
|
||||
def __ge__(self, other: datetime) -> bool: ... # type: ignore[override]
|
||||
def __gt__(self, other: datetime) -> bool: ... # type: ignore[override]
|
||||
def __add__(self, other: timedelta) -> datetime: ...
|
||||
def __radd__(self, other: timedelta) -> datetime: ...
|
||||
@overload # type: ignore
|
||||
@overload # type: ignore[override]
|
||||
def __sub__(self, other: datetime) -> timedelta: ...
|
||||
@overload
|
||||
def __sub__(self, other: timedelta) -> datetime: ...
|
||||
|
||||
@@ -30,7 +30,7 @@ class _gdbm:
|
||||
def keys(self) -> list[bytes]: ...
|
||||
def setdefault(self, k: _KeyType, default: _ValueType = ...) -> bytes: ...
|
||||
# Don't exist at runtime
|
||||
__new__: None # type: ignore
|
||||
__init__: None # type: ignore
|
||||
__new__: None # type: ignore[assignment]
|
||||
__init__: None # type: ignore[assignment]
|
||||
|
||||
def open(__filename: str, __flags: str = ..., __mode: int = ...) -> _gdbm: ...
|
||||
|
||||
@@ -29,7 +29,7 @@ class _dbm:
|
||||
def keys(self) -> list[bytes]: ...
|
||||
def setdefault(self, k: _KeyType, default: _ValueType = ...) -> bytes: ...
|
||||
# Don't exist at runtime
|
||||
__new__: None # type: ignore
|
||||
__init__: None # type: ignore
|
||||
__new__: None # type: ignore[assignment]
|
||||
__init__: None # type: ignore[assignment]
|
||||
|
||||
def open(__filename: str, __flags: str = ..., __mode: int = ...) -> _dbm: ...
|
||||
|
||||
@@ -29,9 +29,7 @@ class SequenceMatcher(Generic[_T]):
|
||||
|
||||
# mypy thinks the signatures of the overloads overlap, but the types still work fine
|
||||
@overload
|
||||
def get_close_matches( # type: ignore
|
||||
word: AnyStr, possibilities: Iterable[AnyStr], n: int = ..., cutoff: float = ...
|
||||
) -> list[AnyStr]: ...
|
||||
def get_close_matches(word: AnyStr, possibilities: Iterable[AnyStr], n: int = ..., cutoff: float = ...) -> list[AnyStr]: ... # type: ignore[misc]
|
||||
@overload
|
||||
def get_close_matches(
|
||||
word: Sequence[_T], possibilities: Iterable[Sequence[_T]], n: int = ..., cutoff: float = ...
|
||||
|
||||
@@ -6,9 +6,9 @@ from typing_extensions import Literal
|
||||
# Iterable[T], so that Union[List[T], Literal[""]] could be used as a return
|
||||
# type. But because this only works when T is str, we need Sequence[T] instead.
|
||||
@overload
|
||||
def commonprefix(m: Sequence[str]) -> str | Literal[""]: ... # type: ignore
|
||||
def commonprefix(m: Sequence[str]) -> str | Literal[""]: ... # type: ignore[misc]
|
||||
@overload
|
||||
def commonprefix(m: Sequence[Text]) -> Text: ... # type: ignore
|
||||
def commonprefix(m: Sequence[Text]) -> Text: ...
|
||||
@overload
|
||||
def commonprefix(m: Sequence[list[SupportsLessThanT]]) -> Sequence[SupportsLessThanT]: ...
|
||||
@overload
|
||||
|
||||
@@ -104,7 +104,7 @@ class Traceback(NamedTuple):
|
||||
lineno: int
|
||||
function: str
|
||||
code_context: list[str] | None
|
||||
index: int | None # type: ignore
|
||||
index: int | None # type: ignore[assignment]
|
||||
|
||||
_FrameInfo = tuple[FrameType, str, int, str, Optional[list[str]], Optional[int]]
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class SocketHandler(Handler):
|
||||
def createSocket(self) -> None: ...
|
||||
|
||||
class DatagramHandler(SocketHandler):
|
||||
def makeSocket(self) -> SocketType: ... # type: ignore
|
||||
def makeSocket(self) -> SocketType: ... # type: ignore[override]
|
||||
|
||||
class SysLogHandler(Handler):
|
||||
LOG_EMERG: int
|
||||
|
||||
@@ -9,8 +9,7 @@ class SMTPChannel(asynchat.async_chat):
|
||||
COMMAND: int
|
||||
DATA: int
|
||||
def __init__(self, server: SMTPServer, conn: socket.socket, addr: Any, data_size_limit: int = ...) -> None: ...
|
||||
# base asynchat.async_chat.push() accepts bytes
|
||||
def push(self, msg: Text) -> None: ... # type: ignore
|
||||
def push(self, msg: Text) -> None: ...
|
||||
def collect_incoming_data(self, data: bytes) -> None: ...
|
||||
def found_terminator(self) -> None: ...
|
||||
def smtp_HELO(self, arg: str) -> None: ...
|
||||
@@ -35,11 +34,7 @@ class SMTPServer(asyncore.dispatcher):
|
||||
class DebuggingServer(SMTPServer): ...
|
||||
|
||||
class PureProxy(SMTPServer):
|
||||
def process_message( # type: ignore
|
||||
self, peer: _Address, mailfrom: str, rcpttos: list[Text], data: bytes | str
|
||||
) -> str | None: ...
|
||||
def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[Text], data: bytes | str) -> str | None: ... # type: ignore[override]
|
||||
|
||||
class MailmanProxy(PureProxy):
|
||||
def process_message( # type: ignore
|
||||
self, peer: _Address, mailfrom: str, rcpttos: list[Text], data: bytes | str
|
||||
) -> str | None: ...
|
||||
def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[Text], data: bytes | str) -> str | None: ... # type: ignore[override]
|
||||
|
||||
@@ -175,7 +175,7 @@ class TPen(object):
|
||||
def isvisible(self) -> bool: ...
|
||||
# Note: signatures 1 and 2 overlap unsafely when no arguments are provided
|
||||
@overload
|
||||
def pen(self) -> _PenState: ... # type: ignore
|
||||
def pen(self) -> _PenState: ... # type: ignore[misc]
|
||||
@overload
|
||||
def pen(
|
||||
self,
|
||||
@@ -215,7 +215,7 @@ class RawTurtle(TPen, TNavigator):
|
||||
def shape(self, name: str) -> None: ...
|
||||
# Unsafely overlaps when no arguments are provided
|
||||
@overload
|
||||
def shapesize(self) -> tuple[float, float, float]: ... # type: ignore
|
||||
def shapesize(self) -> tuple[float, float, float]: ... # type: ignore[misc]
|
||||
@overload
|
||||
def shapesize(
|
||||
self, stretch_wid: float | None = ..., stretch_len: float | None = ..., outline: float | None = ...
|
||||
@@ -423,7 +423,7 @@ def isvisible() -> bool: ...
|
||||
|
||||
# Note: signatures 1 and 2 overlap unsafely when no arguments are provided
|
||||
@overload
|
||||
def pen() -> _PenState: ... # type: ignore
|
||||
def pen() -> _PenState: ... # type: ignore[misc]
|
||||
@overload
|
||||
def pen(
|
||||
pen: _PenState | None = ...,
|
||||
@@ -459,7 +459,7 @@ def shape(name: str) -> None: ...
|
||||
|
||||
# Unsafely overlaps when no arguments are provided
|
||||
@overload
|
||||
def shapesize() -> tuple[float, float, float]: ... # type: ignore
|
||||
def shapesize() -> tuple[float, float, float]: ... # type: ignore[misc]
|
||||
@overload
|
||||
def shapesize(stretch_wid: float | None = ..., stretch_len: float | None = ..., outline: float | None = ...) -> None: ...
|
||||
def settiltangle(angle: float) -> None: ...
|
||||
|
||||
@@ -47,8 +47,7 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
|
||||
# Using NoReturn so that only calls using mypy plugin hook that specialize the signature
|
||||
# can go through.
|
||||
def setdefault(self, k: NoReturn, default: object) -> object: ...
|
||||
# Mypy plugin hook for 'pop' expects that 'default' has a type variable type.
|
||||
def pop(self, k: NoReturn, default: _T = ...) -> object: ... # type: ignore
|
||||
def pop(self, k: NoReturn, default: _T = ...) -> object: ...
|
||||
def update(self: _T, __m: _T) -> None: ...
|
||||
def has_key(self, k: str) -> bool: ...
|
||||
def viewitems(self) -> ItemsView[str, object]: ...
|
||||
|
||||
@@ -43,7 +43,7 @@ class WeakValueDictionary(MutableMapping[_KT, _VT]):
|
||||
class KeyedRef(ref[_T], Generic[_KT, _T]):
|
||||
key: _KT
|
||||
# This __new__ method uses a non-standard name for the "cls" parameter
|
||||
def __new__(type, ob: _T, callback: Callable[[_T], Any], key: _KT) -> KeyedRef[_KT, _T]: ... # type: ignore
|
||||
def __new__(type, ob: _T, callback: Callable[[_T], Any], key: _KT) -> KeyedRef[_KT, _T]: ...
|
||||
def __init__(self, ob: _T, callback: Callable[[_T], Any], key: _KT) -> None: ...
|
||||
|
||||
class WeakKeyDictionary(MutableMapping[_KT, _VT]):
|
||||
|
||||
@@ -11,7 +11,7 @@ class NodeList(list[_T]):
|
||||
class EmptyNodeList(tuple[Any, ...]):
|
||||
length: int
|
||||
def item(self, index: int) -> None: ...
|
||||
def __add__(self, other: Iterable[_T]) -> NodeList[_T]: ... # type: ignore
|
||||
def __add__(self, other: Iterable[_T]) -> NodeList[_T]: ... # type: ignore[override]
|
||||
def __radd__(self, other: Iterable[_T]) -> NodeList[_T]: ...
|
||||
|
||||
def defproperty(klass: type[Any], name: str, doc: str) -> None: ...
|
||||
|
||||
@@ -2,5 +2,5 @@ from typing import Any
|
||||
|
||||
def __getattr__(name: str) -> Any: ... # incomplete
|
||||
|
||||
class DocumentLS(Any): ... # type: ignore
|
||||
class DOMImplementationLS(Any): ... # type: ignore
|
||||
class DocumentLS(Any): ...
|
||||
class DOMImplementationLS(Any): ...
|
||||
|
||||
@@ -58,8 +58,8 @@ class DateTime:
|
||||
def __le__(self, other: _dateTimeComp) -> bool: ...
|
||||
def __gt__(self, other: _dateTimeComp) -> bool: ...
|
||||
def __ge__(self, other: _dateTimeComp) -> bool: ...
|
||||
def __eq__(self, other: _dateTimeComp) -> bool: ... # type: ignore
|
||||
def __ne__(self, other: _dateTimeComp) -> bool: ... # type: ignore
|
||||
def __eq__(self, other: _dateTimeComp) -> bool: ... # type: ignore[override]
|
||||
def __ne__(self, other: _dateTimeComp) -> bool: ... # type: ignore[override]
|
||||
def timetuple(self) -> struct_time: ...
|
||||
def __cmp__(self, other: _dateTimeComp) -> int: ...
|
||||
def decode(self, data: Any) -> None: ...
|
||||
|
||||
@@ -30,9 +30,9 @@ class ZipExtFile(io.BufferedIOBase):
|
||||
close_fileobj: bool = ...,
|
||||
) -> None: ...
|
||||
def read(self, n: int | None = ...) -> bytes: ...
|
||||
def readline(self, limit: int = ...) -> bytes: ... # type: ignore
|
||||
def readline(self, limit: int = ...) -> bytes: ... # type: ignore[override]
|
||||
def peek(self, n: int = ...) -> bytes: ...
|
||||
def read1(self, n: int | None) -> bytes: ... # type: ignore
|
||||
def read1(self, n: int | None) -> bytes: ...
|
||||
|
||||
class _Writer(Protocol):
|
||||
def write(self, __s: str) -> Any: ...
|
||||
|
||||
@@ -100,7 +100,7 @@ class HTTPMessage(email.message.Message):
|
||||
|
||||
def parse_headers(fp: io.BufferedIOBase, _class: Callable[[], email.message.Message] = ...) -> HTTPMessage: ...
|
||||
|
||||
class HTTPResponse(io.BufferedIOBase, BinaryIO): # type: ignore # argument disparities between base classes
|
||||
class HTTPResponse(io.BufferedIOBase, BinaryIO):
|
||||
msg: HTTPMessage
|
||||
headers: HTTPMessage
|
||||
version: int
|
||||
|
||||
@@ -133,10 +133,10 @@ class FileFinder(importlib.abc.PathEntryFinder):
|
||||
cls, *loader_details: tuple[type[importlib.abc.Loader], list[str]]
|
||||
) -> Callable[[str], importlib.abc.PathEntryFinder]: ...
|
||||
|
||||
class SourceFileLoader(importlib.abc.FileLoader, importlib.abc.SourceLoader): # type: ignore # argument disparities
|
||||
class SourceFileLoader(importlib.abc.FileLoader, importlib.abc.SourceLoader):
|
||||
def set_data(self, path: importlib.abc._Path, data: bytes, *, _mode: int = ...) -> None: ...
|
||||
|
||||
class SourcelessFileLoader(importlib.abc.FileLoader, importlib.abc.SourceLoader): ... # type: ignore # argument disparities
|
||||
class SourcelessFileLoader(importlib.abc.FileLoader, importlib.abc.SourceLoader): ...
|
||||
|
||||
class ExtensionFileLoader(importlib.abc.ExecutionLoader):
|
||||
def __init__(self, name: str, path: importlib.abc._Path) -> None: ...
|
||||
|
||||
@@ -108,7 +108,7 @@ class BufferedIOBase(IOBase):
|
||||
def read(self, __size: int | None = ...) -> bytes: ...
|
||||
def read1(self, __size: int = ...) -> bytes: ...
|
||||
|
||||
class FileIO(RawIOBase, BinaryIO): # type: ignore # argument disparities between the base classes
|
||||
class FileIO(RawIOBase, BinaryIO):
|
||||
mode: str
|
||||
name: StrOrBytesPath | int # type: ignore[assignment]
|
||||
def __init__(
|
||||
@@ -120,7 +120,7 @@ class FileIO(RawIOBase, BinaryIO): # type: ignore # argument disparities betwee
|
||||
def read(self, __size: int = ...) -> bytes: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
|
||||
class BytesIO(BufferedIOBase, BinaryIO): # type: ignore # argument disparities between the base classes
|
||||
class BytesIO(BufferedIOBase, BinaryIO):
|
||||
def __init__(self, initial_bytes: bytes = ...) -> None: ...
|
||||
# BytesIO does not contain a "name" field. This workaround is necessary
|
||||
# to allow BytesIO sub-classes to add this field, as it is defined
|
||||
@@ -134,7 +134,7 @@ class BytesIO(BufferedIOBase, BinaryIO): # type: ignore # argument disparities
|
||||
else:
|
||||
def read1(self, __size: int | None) -> bytes: ... # type: ignore[override]
|
||||
|
||||
class BufferedReader(BufferedIOBase, BinaryIO): # type: ignore # argument disparities between base classes
|
||||
class BufferedReader(BufferedIOBase, BinaryIO):
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __init__(self, raw: RawIOBase, buffer_size: int = ...) -> None: ...
|
||||
def peek(self, __size: int = ...) -> bytes: ...
|
||||
@@ -143,7 +143,7 @@ class BufferedReader(BufferedIOBase, BinaryIO): # type: ignore # argument dispa
|
||||
else:
|
||||
def read1(self, __size: int) -> bytes: ... # type: ignore[override]
|
||||
|
||||
class BufferedWriter(BufferedIOBase, BinaryIO): # type: ignore # argument disparities between base classes
|
||||
class BufferedWriter(BufferedIOBase, BinaryIO):
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __init__(self, raw: RawIOBase, buffer_size: int = ...) -> None: ...
|
||||
def write(self, __buffer: ReadableBuffer) -> int: ...
|
||||
@@ -175,7 +175,7 @@ class TextIOBase(IOBase):
|
||||
def read(self, __size: int | None = ...) -> str: ...
|
||||
def tell(self) -> int: ...
|
||||
|
||||
class TextIOWrapper(TextIOBase, TextIO): # type: ignore # argument disparities between base classes
|
||||
class TextIOWrapper(TextIOBase, TextIO):
|
||||
def __init__(
|
||||
self,
|
||||
buffer: IO[bytes],
|
||||
|
||||
@@ -432,7 +432,7 @@ if sys.version_info >= (3, 8):
|
||||
class AsyncMagicMixin(MagicMixin):
|
||||
def __init__(self, *args: Any, **kw: Any) -> None: ...
|
||||
|
||||
class AsyncMock(AsyncMockMixin, AsyncMagicMixin, Mock): ... # type: ignore # argument disparities between base classes
|
||||
class AsyncMock(AsyncMockMixin, AsyncMagicMixin, Mock): ...
|
||||
|
||||
class MagicProxy:
|
||||
name: str
|
||||
|
||||
@@ -53,9 +53,9 @@ def get_app_kwarg_dict(appInstance: _App | None = ...) -> _Options: ...
|
||||
def flexible_str(obj: object) -> str | None: ...
|
||||
def serialize_option(options_dict: _Options, key: str, upper: bool = ...) -> None: ...
|
||||
@overload
|
||||
def ensure_iterable(inst: str) -> list[str]: ... # type: ignore
|
||||
def ensure_iterable(inst: str) -> list[str]: ... # type: ignore[misc]
|
||||
@overload
|
||||
def ensure_iterable(inst: _IterableT) -> _IterableT: ... # type: ignore
|
||||
def ensure_iterable(inst: _IterableT) -> _IterableT: ...
|
||||
@overload
|
||||
def ensure_iterable(inst: _T) -> list[_T]: ...
|
||||
def sanitize_regex_param(param: str | list[str]) -> list[str]: ...
|
||||
|
||||
@@ -10,7 +10,7 @@ class _SybNumeric_pyodbc(sqltypes.Numeric):
|
||||
class SybaseExecutionContext_pyodbc(SybaseExecutionContext):
|
||||
def set_ddl_autocommit(self, connection, value) -> None: ...
|
||||
|
||||
class SybaseDialect_pyodbc(PyODBCConnector, SybaseDialect): # type: ignore # argument disparities between base classes
|
||||
class SybaseDialect_pyodbc(PyODBCConnector, SybaseDialect):
|
||||
supports_statement_cache: bool
|
||||
colspecs: Any
|
||||
@classmethod
|
||||
|
||||
@@ -75,7 +75,7 @@ class ORMFromStatementCompileState(ORMCompileState):
|
||||
@classmethod
|
||||
def create_for_statement(cls, statement_container, compiler, **kw): ...
|
||||
|
||||
class ORMSelectCompileState(ORMCompileState, SelectState): # type: ignore # argument disparities between base classes
|
||||
class ORMSelectCompileState(ORMCompileState, SelectState):
|
||||
multi_row_eager_loaders: bool
|
||||
compound_eager_adapter: Any
|
||||
correlate: Any
|
||||
|
||||
@@ -37,7 +37,7 @@ class Table(DialectKWArgs, SchemaItem, TableClause):
|
||||
def tometadata(self, metadata, schema=..., referred_schema_fn: Any | None = ..., name: Any | None = ...): ...
|
||||
def to_metadata(self, metadata, schema=..., referred_schema_fn: Any | None = ..., name: Any | None = ...): ...
|
||||
|
||||
class Column(DialectKWArgs, SchemaItem, ColumnClause): # type: ignore # argument disparities between base classes
|
||||
class Column(DialectKWArgs, SchemaItem, ColumnClause):
|
||||
__visit_name__: str
|
||||
inherit_cache: bool
|
||||
key: Any
|
||||
|
||||
@@ -155,7 +155,7 @@ class SchemaType(SchemaEventTarget):
|
||||
def create(self, bind: Any | None = ..., checkfirst: bool = ...) -> None: ...
|
||||
def drop(self, bind: Any | None = ..., checkfirst: bool = ...) -> None: ...
|
||||
|
||||
class Enum(Emulated, String, SchemaType): # type: ignore # argument disparities between base classes
|
||||
class Enum(Emulated, String, SchemaType):
|
||||
__visit_name__: str
|
||||
def __init__(self, *enums, **kw) -> None: ...
|
||||
@property
|
||||
|
||||
@@ -79,7 +79,7 @@ class NullTranslations(gettext.NullTranslations):
|
||||
ugettext: Any
|
||||
ungettext: Any
|
||||
|
||||
class Translations(NullTranslations, gettext.GNUTranslations): # type: ignore # argument disparities between base classes
|
||||
class Translations(NullTranslations, gettext.GNUTranslations):
|
||||
DEFAULT_DOMAIN: str
|
||||
domain: Any
|
||||
def __init__(self, fp: Any | None = ..., domain: Any | None = ...) -> None: ...
|
||||
|
||||
@@ -74,7 +74,9 @@ class BeautifulSoup(Tag):
|
||||
def handle_starttag(self, name, namespace, nsprefix, attrs, sourceline: Any | None = ..., sourcepos: Any | None = ...): ...
|
||||
def handle_endtag(self, name, nsprefix: Any | None = ...) -> None: ...
|
||||
def handle_data(self, data) -> None: ...
|
||||
def decode(self, pretty_print: bool = ..., eventual_encoding: str = ..., formatter: str | Formatter = ...): ... # type: ignore # missing some arguments
|
||||
def decode( # type: ignore[override]
|
||||
self, pretty_print: bool = ..., eventual_encoding: str = ..., formatter: str | Formatter = ...
|
||||
): ... # missing some arguments
|
||||
|
||||
class BeautifulStoneSoup(BeautifulSoup): ...
|
||||
class StopParsing(Exception): ...
|
||||
|
||||
@@ -7,7 +7,7 @@ class HTML5TreeBuilder(HTMLTreeBuilder):
|
||||
features: Any
|
||||
TRACKS_LINE_NUMBERS: bool
|
||||
user_specified_encoding: Any
|
||||
def prepare_markup( # type: ignore # user_specified_encoding doesn't have a default
|
||||
def prepare_markup( # type: ignore[override] # user_specified_encoding doesn't have a default
|
||||
self, markup, user_specified_encoding, document_declared_encoding: Any | None = ..., exclude_encodings: Any | None = ...
|
||||
) -> None: ...
|
||||
def feed(self, markup) -> None: ...
|
||||
@@ -15,7 +15,7 @@ class HTML5TreeBuilder(HTMLTreeBuilder):
|
||||
def create_treebuilder(self, namespaceHTMLElements): ...
|
||||
def test_fragment_to_document(self, fragment): ...
|
||||
|
||||
class TreeBuilderForHtml5lib(Any): # type: ignore # html5lib.treebuilders.base.TreeBuilder
|
||||
class TreeBuilderForHtml5lib(Any): # html5lib.treebuilders.base.TreeBuilder
|
||||
soup: Any
|
||||
parser: Any
|
||||
store_line_numbers: Any
|
||||
@@ -42,7 +42,7 @@ class AttrList:
|
||||
def __getitem__(self, name): ...
|
||||
def __contains__(self, name): ...
|
||||
|
||||
class Element(Any): # type: ignore # html5lib.treebuilders.base.Node
|
||||
class Element(Any): # html5lib.treebuilders.base.Node
|
||||
element: Any
|
||||
soup: Any
|
||||
namespace: Any
|
||||
|
||||
@@ -19,7 +19,7 @@ class LXMLTreeBuilderForXML(TreeBuilder):
|
||||
soup: Any
|
||||
nsmaps: Any
|
||||
def __init__(self, parser: Any | None = ..., empty_element_tags: Any | None = ..., **kwargs) -> None: ...
|
||||
def prepare_markup( # type: ignore # the order of the parameters is different
|
||||
def prepare_markup( # type: ignore[override] # the order of the parameters is different
|
||||
self,
|
||||
markup,
|
||||
user_specified_encoding: Any | None = ...,
|
||||
@@ -37,7 +37,7 @@ class LXMLTreeBuilderForXML(TreeBuilder):
|
||||
def comment(self, content) -> None: ...
|
||||
def test_fragment_to_document(self, fragment): ...
|
||||
|
||||
class LXMLTreeBuilder(HTMLTreeBuilder, LXMLTreeBuilderForXML): # type: ignore # argument disparities between base classes
|
||||
class LXMLTreeBuilder(HTMLTreeBuilder, LXMLTreeBuilderForXML):
|
||||
NAME: Any
|
||||
ALTERNATE_NAMES: Any
|
||||
features: Any
|
||||
|
||||
@@ -19,12 +19,12 @@ class AttributeValueWithCharsetSubstitution(str): ...
|
||||
|
||||
class CharsetMetaAttributeValue(AttributeValueWithCharsetSubstitution):
|
||||
def __new__(cls, original_value): ...
|
||||
def encode(self, encoding: str) -> str: ... # type: ignore # incompatible with str
|
||||
def encode(self, encoding: str) -> str: ... # type: ignore[override] # incompatible with str
|
||||
|
||||
class ContentMetaAttributeValue(AttributeValueWithCharsetSubstitution):
|
||||
CHARSET_RE: Pattern[str]
|
||||
def __new__(cls, original_value): ...
|
||||
def encode(self, encoding: str) -> str: ... # type: ignore # incompatible with str
|
||||
def encode(self, encoding: str) -> str: ... # type: ignore[override] # incompatible with str
|
||||
|
||||
_PageElementT = TypeVar("_PageElementT", bound=PageElement)
|
||||
# The wrapping Union[] can be removed once mypy fully supports | in type aliases.
|
||||
|
||||
@@ -64,7 +64,7 @@ class HmacAuthV4Handler(AuthHandler, HmacKeys):
|
||||
def signature(self, http_request, string_to_sign): ...
|
||||
def add_auth(self, req, **kwargs): ...
|
||||
|
||||
class S3HmacAuthV4Handler(HmacAuthV4Handler, AuthHandler): # type: ignore # argument disparities between base classes
|
||||
class S3HmacAuthV4Handler(HmacAuthV4Handler, AuthHandler):
|
||||
capability: Any
|
||||
region_name: Any
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
@@ -166,7 +166,9 @@ class AWSQueryConnection(AWSAuthConnection):
|
||||
provider: str = ...,
|
||||
) -> None: ...
|
||||
def get_utf8_value(self, value): ...
|
||||
def make_request(self, action, params: Any | None = ..., path: str = ..., verb: str = ..., *args, **kwargs): ... # type: ignore # https://github.com/python/mypy/issues/1237
|
||||
def make_request( # type: ignore[override]
|
||||
self, action, params: Any | None = ..., path: str = ..., verb: str = ..., *args, **kwargs
|
||||
): ...
|
||||
def build_list_params(self, params, items, label): ...
|
||||
def build_complex_list_params(self, params, items, label, names): ...
|
||||
def get_list(self, action, params, markers, path: str = ..., parent: Any | None = ..., verb: str = ...): ...
|
||||
|
||||
@@ -123,4 +123,17 @@ class S3Connection(AWSAuthConnection):
|
||||
def lookup(self, bucket_name, validate: bool = ..., headers: dict[str, str] | None = ...): ...
|
||||
def create_bucket(self, bucket_name, headers: dict[str, str] | None = ..., location: Any = ..., policy: Any | None = ...): ...
|
||||
def delete_bucket(self, bucket, headers: dict[str, str] | None = ...): ...
|
||||
def make_request(self, method, bucket: str = ..., key: str = ..., headers: Any | None = ..., data: str = ..., query_args: Any | None = ..., sender: Any | None = ..., override_num_retries: Any | None = ..., retry_handler: Any | None = ..., *args, **kwargs): ... # type: ignore # https://github.com/python/mypy/issues/1237
|
||||
def make_request( # type: ignore[override]
|
||||
self,
|
||||
method,
|
||||
bucket: str = ...,
|
||||
key: str = ...,
|
||||
headers: Any | None = ...,
|
||||
data: str = ...,
|
||||
query_args: Any | None = ...,
|
||||
sender: Any | None = ...,
|
||||
override_num_retries: Any | None = ...,
|
||||
retry_handler: Any | None = ...,
|
||||
*args,
|
||||
**kwargs,
|
||||
): ...
|
||||
|
||||
@@ -275,7 +275,7 @@ class AsyncMockMixin(Base):
|
||||
class AsyncMagicMixin(MagicMixin):
|
||||
def __init__(self, *args: Any, **kw: Any) -> None: ...
|
||||
|
||||
class AsyncMock(AsyncMockMixin, AsyncMagicMixin, Mock): ... # type: ignore # argument disparities between base classes
|
||||
class AsyncMock(AsyncMockMixin, AsyncMagicMixin, Mock): ...
|
||||
|
||||
class MagicProxy(Base):
|
||||
name: str
|
||||
|
||||
@@ -39,7 +39,7 @@ class BarChart(_BarChartBase):
|
||||
self, gapWidth: int = ..., overlap: Any | None = ..., serLines: Any | None = ..., extLst: Any | None = ..., **kw
|
||||
) -> None: ...
|
||||
|
||||
class BarChart3D(_BarChartBase, _3DBase): # type: ignore # incompatible base classes
|
||||
class BarChart3D(_BarChartBase, _3DBase):
|
||||
tagname: str
|
||||
barDir: Any
|
||||
grouping: Any
|
||||
|
||||
@@ -30,7 +30,7 @@ class _SurfaceChartBase(ChartBase):
|
||||
@abstractmethod
|
||||
def tagname(self) -> str: ...
|
||||
|
||||
class SurfaceChart3D(_SurfaceChartBase, _3DBase): # type: ignore # incompatible base classes
|
||||
class SurfaceChart3D(_SurfaceChartBase, _3DBase):
|
||||
tagname: str
|
||||
wireframe: Any
|
||||
ser: Any
|
||||
|
||||
@@ -27,14 +27,14 @@ class Expression(StrAndRepr):
|
||||
|
||||
class Literal(Expression):
|
||||
literal: str
|
||||
identity_tuple: tuple[str, str] # type: ignore
|
||||
identity_tuple: tuple[str, str] # type: ignore[assignment]
|
||||
def __init__(self, literal: str, name: str = ...) -> None: ...
|
||||
|
||||
class TokenMatcher(Literal): ...
|
||||
|
||||
class Regex(Expression):
|
||||
re: Pattern[str]
|
||||
identity_tuple: tuple[str, Pattern[str]] # type: ignore
|
||||
identity_tuple: tuple[str, Pattern[str]] # type: ignore[assignment]
|
||||
def __init__(
|
||||
self,
|
||||
pattern: str,
|
||||
|
||||
@@ -44,7 +44,7 @@ class RuleVisitor(NodeVisitor):
|
||||
def visit_spaceless_literal(self, spaceless_literal: Node, visited_children: typing.Sequence[Any]) -> Literal: ...
|
||||
def visit_regex(self, node: Node, regex: typing.Sequence[Any]) -> Regex: ...
|
||||
def visit_parenthesized(self, node: Node, parenthesized: typing.Sequence[Any]) -> Expression: ...
|
||||
def generic_visit(self, node: Node, visited_children: typing.Sequence[Any]) -> typing.Sequence[Any] | Node: ... # type: ignore
|
||||
def generic_visit(self, node: Node, visited_children: typing.Sequence[Any]) -> typing.Sequence[Any] | Node: ... # type: ignore[override]
|
||||
|
||||
class TokenRuleVisitor(RuleVisitor):
|
||||
def visit_spaceless_literal(self, spaceless_literal: Node, visited_children: typing.Sequence[Any]) -> TokenMatcher: ...
|
||||
|
||||
@@ -9,7 +9,7 @@ class _DummyCffiHasher:
|
||||
salt_len: int
|
||||
hash_len: int
|
||||
|
||||
class _Argon2Common( # type: ignore
|
||||
class _Argon2Common( # type: ignore[misc]
|
||||
uh.SubclassBackendMixin, uh.ParallelismMixin, uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler
|
||||
):
|
||||
name: str
|
||||
@@ -82,5 +82,5 @@ class _CffiBackend(_Argon2Common):
|
||||
|
||||
class _PureBackend(_Argon2Common): ...
|
||||
|
||||
class argon2(_NoBackend, _Argon2Common): # type: ignore
|
||||
class argon2(_NoBackend, _Argon2Common): # type: ignore[misc]
|
||||
backends: Any
|
||||
|
||||
@@ -2,7 +2,7 @@ from typing import Any
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
class _BcryptCommon(uh.SubclassBackendMixin, uh.TruncateMixin, uh.HasManyIdents, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
class _BcryptCommon(uh.SubclassBackendMixin, uh.TruncateMixin, uh.HasManyIdents, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
checksum_size: int
|
||||
@@ -34,7 +34,7 @@ class _PyBcryptBackend(_BcryptCommon): ...
|
||||
class _OsCryptBackend(_BcryptCommon): ...
|
||||
class _BuiltinBackend(_BcryptCommon): ...
|
||||
|
||||
class bcrypt(_NoBackend, _BcryptCommon): # type: ignore
|
||||
class bcrypt(_NoBackend, _BcryptCommon): # type: ignore[misc]
|
||||
backends: Any
|
||||
|
||||
class _wrapped_bcrypt(bcrypt):
|
||||
|
||||
@@ -2,7 +2,7 @@ from typing import Any
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
class cisco_pix(uh.HasUserContext, uh.StaticHandler): # type: ignore
|
||||
class cisco_pix(uh.HasUserContext, uh.StaticHandler):
|
||||
name: str
|
||||
truncate_size: int
|
||||
truncate_error: bool
|
||||
|
||||
@@ -2,7 +2,7 @@ from typing import Any
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
class des_crypt(uh.TruncateMixin, uh.HasManyBackends, uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
class des_crypt(uh.TruncateMixin, uh.HasManyBackends, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
checksum_chars: Any
|
||||
@@ -16,7 +16,7 @@ class des_crypt(uh.TruncateMixin, uh.HasManyBackends, uh.HasSalt, uh.GenericHand
|
||||
def to_string(self): ...
|
||||
backends: Any
|
||||
|
||||
class bsdi_crypt(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
class bsdi_crypt(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
checksum_size: int
|
||||
@@ -35,7 +35,7 @@ class bsdi_crypt(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler
|
||||
def using(cls, **kwds): ...
|
||||
backends: Any
|
||||
|
||||
class bigcrypt(uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
class bigcrypt(uh.HasSalt, uh.GenericHandler):
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
checksum_chars: Any
|
||||
@@ -46,7 +46,7 @@ class bigcrypt(uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
def from_string(cls, hash): ...
|
||||
def to_string(self): ...
|
||||
|
||||
class crypt16(uh.TruncateMixin, uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
class crypt16(uh.TruncateMixin, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
checksum_size: int
|
||||
|
||||
@@ -4,7 +4,7 @@ import passlib.utils.handlers as uh
|
||||
from passlib.handlers.bcrypt import _wrapped_bcrypt
|
||||
from passlib.ifc import DisabledHash
|
||||
|
||||
class DjangoSaltedHash(uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
class DjangoSaltedHash(uh.HasSalt, uh.GenericHandler):
|
||||
setting_kwds: Any
|
||||
default_salt_size: ClassVar[int]
|
||||
max_salt_size: Any
|
||||
@@ -14,7 +14,7 @@ class DjangoSaltedHash(uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
def from_string(cls, hash): ...
|
||||
def to_string(self): ...
|
||||
|
||||
class DjangoVariableHash(uh.HasRounds, DjangoSaltedHash): # type: ignore
|
||||
class DjangoVariableHash(uh.HasRounds, DjangoSaltedHash): # type: ignore[misc]
|
||||
setting_kwds: Any
|
||||
min_rounds: int
|
||||
@classmethod
|
||||
@@ -64,7 +64,7 @@ class django_pbkdf2_sha1(django_pbkdf2_sha256):
|
||||
|
||||
django_argon2: Any
|
||||
|
||||
class django_des_crypt(uh.TruncateMixin, uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
class django_des_crypt(uh.TruncateMixin, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
|
||||
name: str
|
||||
django_name: str
|
||||
setting_kwds: Any
|
||||
@@ -80,7 +80,7 @@ class django_des_crypt(uh.TruncateMixin, uh.HasSalt, uh.GenericHandler): # type
|
||||
def from_string(cls, hash): ...
|
||||
def to_string(self): ...
|
||||
|
||||
class django_disabled(DisabledHash, uh.StaticHandler): # type: ignore
|
||||
class django_disabled(DisabledHash, uh.StaticHandler):
|
||||
name: str
|
||||
suffix_length: int
|
||||
@classmethod
|
||||
|
||||
@@ -2,7 +2,7 @@ from typing import Any, ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
class fshp(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
|
||||
class fshp(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore[misc]
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
checksum_chars: Any
|
||||
|
||||
@@ -25,7 +25,7 @@ class _Base64DigestHelper(uh.StaticHandler):
|
||||
ident: Any
|
||||
checksum_chars: Any
|
||||
|
||||
class _SaltedBase64DigestHelper(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
|
||||
class _SaltedBase64DigestHelper(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler):
|
||||
setting_kwds: Any
|
||||
checksum_chars: Any
|
||||
ident: Any
|
||||
|
||||
@@ -2,7 +2,7 @@ from typing import Any
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
class _MD5_Common(uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
class _MD5_Common(uh.HasSalt, uh.GenericHandler):
|
||||
setting_kwds: Any
|
||||
checksum_size: int
|
||||
checksum_chars: Any
|
||||
@@ -12,7 +12,7 @@ class _MD5_Common(uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
def from_string(cls, hash): ...
|
||||
def to_string(self): ...
|
||||
|
||||
class md5_crypt(uh.HasManyBackends, _MD5_Common): # type: ignore
|
||||
class md5_crypt(uh.HasManyBackends, _MD5_Common):
|
||||
name: str
|
||||
ident: Any
|
||||
backends: Any
|
||||
|
||||
@@ -3,7 +3,7 @@ from typing import Any
|
||||
import passlib.utils.handlers as uh
|
||||
from passlib.ifc import DisabledHash
|
||||
|
||||
class unix_fallback(DisabledHash, uh.StaticHandler): # type: ignore
|
||||
class unix_fallback(DisabledHash, uh.StaticHandler):
|
||||
name: str
|
||||
context_kwds: Any
|
||||
@classmethod
|
||||
@@ -13,7 +13,7 @@ class unix_fallback(DisabledHash, uh.StaticHandler): # type: ignore
|
||||
@classmethod
|
||||
def verify(cls, secret, hash, enable_wildcard: bool = ...): ... # type: ignore[override]
|
||||
|
||||
class unix_disabled(DisabledHash, uh.MinimalHandler): # type: ignore
|
||||
class unix_disabled(DisabledHash, uh.MinimalHandler):
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
context_kwds: Any
|
||||
|
||||
@@ -2,7 +2,7 @@ from typing import Any
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
class mssql2000(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
|
||||
class mssql2000(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler):
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
checksum_size: int
|
||||
@@ -16,7 +16,7 @@ class mssql2000(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: i
|
||||
@classmethod
|
||||
def verify(cls, secret, hash): ...
|
||||
|
||||
class mssql2005(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
|
||||
class mssql2005(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler):
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
checksum_size: int
|
||||
|
||||
@@ -2,12 +2,12 @@ from typing import Any
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
class oracle10(uh.HasUserContext, uh.StaticHandler): # type: ignore
|
||||
class oracle10(uh.HasUserContext, uh.StaticHandler):
|
||||
name: str
|
||||
checksum_chars: Any
|
||||
checksum_size: int
|
||||
|
||||
class oracle11(uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
class oracle11(uh.HasSalt, uh.GenericHandler):
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
checksum_size: int
|
||||
|
||||
@@ -3,7 +3,7 @@ from typing import Any, ClassVar
|
||||
import passlib.utils.handlers as uh
|
||||
from passlib.utils.handlers import PrefixWrapper
|
||||
|
||||
class Pbkdf2DigestHandler(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
|
||||
class Pbkdf2DigestHandler(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore[misc]
|
||||
setting_kwds: Any
|
||||
checksum_chars: Any
|
||||
default_salt_size: ClassVar[int]
|
||||
@@ -41,7 +41,7 @@ ldap_pbkdf2_sha1: PrefixWrapper
|
||||
ldap_pbkdf2_sha256: PrefixWrapper
|
||||
ldap_pbkdf2_sha512: PrefixWrapper
|
||||
|
||||
class cta_pbkdf2_sha1(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
|
||||
class cta_pbkdf2_sha1(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore[misc]
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
ident: Any
|
||||
@@ -56,7 +56,7 @@ class cta_pbkdf2_sha1(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.Generic
|
||||
def from_string(cls, hash): ...
|
||||
def to_string(self): ...
|
||||
|
||||
class dlitz_pbkdf2_sha1(uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
class dlitz_pbkdf2_sha1(uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
ident: Any
|
||||
@@ -71,7 +71,7 @@ class dlitz_pbkdf2_sha1(uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: i
|
||||
def from_string(cls, hash): ...
|
||||
def to_string(self): ...
|
||||
|
||||
class atlassian_pbkdf2_sha1(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
|
||||
class atlassian_pbkdf2_sha1(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler):
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
ident: Any
|
||||
@@ -82,7 +82,7 @@ class atlassian_pbkdf2_sha1(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler)
|
||||
def from_string(cls, hash): ...
|
||||
def to_string(self): ...
|
||||
|
||||
class grub_pbkdf2_sha512(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
|
||||
class grub_pbkdf2_sha512(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore[misc]
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
ident: Any
|
||||
|
||||
@@ -2,7 +2,7 @@ from typing import Any
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
class phpass(uh.HasManyIdents, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
class phpass(uh.HasManyIdents, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
checksum_chars: Any
|
||||
|
||||
@@ -2,7 +2,7 @@ from typing import Any
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
class postgres_md5(uh.HasUserContext, uh.StaticHandler): # type: ignore
|
||||
class postgres_md5(uh.HasUserContext, uh.StaticHandler):
|
||||
name: str
|
||||
checksum_chars: Any
|
||||
checksum_size: int
|
||||
|
||||
@@ -2,7 +2,7 @@ from typing import Any, ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
class scram(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
|
||||
class scram(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore[misc]
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
ident: Any
|
||||
|
||||
@@ -2,7 +2,7 @@ from typing import Any, ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
class scrypt(uh.ParallelismMixin, uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.HasManyIdents, uh.GenericHandler): # type: ignore
|
||||
class scrypt(uh.ParallelismMixin, uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.HasManyIdents, uh.GenericHandler): # type: ignore[misc]
|
||||
backends: ClassVar[tuple[str, ...]]
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
|
||||
@@ -4,7 +4,7 @@ import passlib.utils.handlers as uh
|
||||
|
||||
log: Any
|
||||
|
||||
class sha1_crypt(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
class sha1_crypt(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
ident: Any
|
||||
|
||||
@@ -2,7 +2,7 @@ from typing import Any
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
class _SHA2_Common(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
class _SHA2_Common(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
|
||||
setting_kwds: Any
|
||||
checksum_chars: Any
|
||||
max_salt_size: int
|
||||
|
||||
@@ -2,7 +2,7 @@ from typing import Any, ClassVar
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
class sun_md5_crypt(uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore
|
||||
class sun_md5_crypt(uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
checksum_chars: Any
|
||||
|
||||
@@ -2,7 +2,7 @@ from typing import Any
|
||||
|
||||
import passlib.utils.handlers as uh
|
||||
|
||||
class lmhash(uh.TruncateMixin, uh.HasEncodingContext, uh.StaticHandler): # type: ignore
|
||||
class lmhash(uh.TruncateMixin, uh.HasEncodingContext, uh.StaticHandler):
|
||||
name: str
|
||||
setting_kwds: Any
|
||||
checksum_chars: Any
|
||||
@@ -23,14 +23,14 @@ class nthash(uh.StaticHandler):
|
||||
|
||||
bsd_nthash: Any
|
||||
|
||||
class msdcc(uh.HasUserContext, uh.StaticHandler): # type: ignore
|
||||
class msdcc(uh.HasUserContext, uh.StaticHandler):
|
||||
name: str
|
||||
checksum_chars: Any
|
||||
checksum_size: int
|
||||
@classmethod
|
||||
def raw(cls, secret, user): ...
|
||||
|
||||
class msdcc2(uh.HasUserContext, uh.StaticHandler): # type: ignore
|
||||
class msdcc2(uh.HasUserContext, uh.StaticHandler):
|
||||
name: str
|
||||
checksum_chars: Any
|
||||
checksum_size: int
|
||||
|
||||
@@ -148,7 +148,7 @@ class BackendMixin(PasswordHash, metaclass=abc.ABCMeta):
|
||||
def set_backend(cls, name: str = ..., dryrun: bool = ...): ...
|
||||
|
||||
class SubclassBackendMixin(BackendMixin, metaclass=abc.ABCMeta): ...
|
||||
class HasManyBackends(BackendMixin, GenericHandler): ... # type: ignore
|
||||
class HasManyBackends(BackendMixin, GenericHandler): ...
|
||||
|
||||
class PrefixWrapper:
|
||||
name: Any
|
||||
|
||||
@@ -33,7 +33,7 @@ class _BaseFile(list[_TB]):
|
||||
metadata_is_fuzzy: bool
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def __unicode__(self) -> Text: ...
|
||||
def __contains__(self, entry: _TB) -> bool: ... # type: ignore # AttributeError otherwise
|
||||
def __contains__(self, entry: _TB) -> bool: ... # type: ignore[override] # AttributeError otherwise
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def append(self, entry: _TB) -> None: ...
|
||||
def insert(self, index: SupportsIndex, entry: _TB) -> None: ...
|
||||
@@ -60,7 +60,7 @@ class MOFile(_BaseFile[MOEntry]):
|
||||
version: int
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def save_as_pofile(self, fpath: str) -> None: ...
|
||||
def save(self, fpath: Text | None = ...) -> None: ... # type: ignore # binary file does not allow argument repr_method
|
||||
def save(self, fpath: Text | None = ...) -> None: ... # type: ignore[override] # binary file does not allow argument repr_method
|
||||
def percent_translated(self) -> int: ...
|
||||
def translated_entries(self) -> list[MOEntry]: ...
|
||||
def untranslated_entries(self) -> list[MOEntry]: ...
|
||||
|
||||
Reference in New Issue
Block a user