Add mypy error codes to '# type: ignore' comments (#6379)

This commit is contained in:
Akuli
2021-11-26 08:07:56 +02:00
committed by GitHub
parent 1278fa86e2
commit a5bc1e037f
74 changed files with 218 additions and 202 deletions
+8 -8
View File
@@ -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: ...
+2 -2
View File
@@ -143,11 +143,11 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
@overload
def parse_args(self, args: Sequence[str] | None = ...) -> Namespace: ...
@overload
def parse_args(self, args: Sequence[str] | None, namespace: None) -> Namespace: ... # type: ignore
def parse_args(self, args: Sequence[str] | None, namespace: None) -> Namespace: ... # type: ignore[misc]
@overload
def parse_args(self, args: Sequence[str] | 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: ...
if sys.version_info >= (3, 7):
+1 -1
View File
@@ -8,7 +8,7 @@
# sys.
import sys
import typing as _typing
from _ast import * # type: ignore
from _ast import *
from typing import Any, Iterator, TypeVar, overload
from typing_extensions import Literal
+3 -3
View File
@@ -46,11 +46,11 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
def get_protocol(self) -> protocols.BaseProtocol: ...
def is_closing(self) -> bool: ...
def close(self) -> None: ...
def get_pid(self) -> int | None: ... # type: ignore
def get_pid(self) -> int | None: ... # type: ignore[override]
def get_returncode(self) -> int | None: ...
def get_pipe_transport(self, fd: int) -> _File: ... # type: ignore
def get_pipe_transport(self, fd: int) -> _File: ... # type: ignore[override]
def _check_proc(self) -> None: ... # undocumented
def send_signal(self, signal: int) -> None: ... # type: ignore
def send_signal(self, signal: int) -> None: ... # type: ignore[override]
def terminate(self) -> None: ...
def kill(self) -> None: ...
async def _connect_pipes(self, waiter: futures.Future[Any] | None) -> None: ... # undocumented
+5 -3
View File
@@ -34,7 +34,7 @@ else:
) -> Iterator[Future[_T]]: ...
@overload
def ensure_future(coro_or_future: _FT, *, loop: AbstractEventLoop | None = ...) -> _FT: ... # type: ignore
def ensure_future(coro_or_future: _FT, *, loop: AbstractEventLoop | None = ...) -> _FT: ... # type: ignore[misc]
@overload
def ensure_future(coro_or_future: Awaitable[_T], *, loop: AbstractEventLoop | None = ...) -> Task[_T]: ...
@@ -232,7 +232,7 @@ if sys.version_info >= (3, 10):
def shield(arg: _FutureT[_T]) -> Future[_T]: ...
def sleep(delay: float, result: _T = ...) -> Future[_T]: ...
@overload
def wait(fs: Iterable[_FT], *, timeout: float | None = ..., return_when: str = ...) -> Future[tuple[set[_FT], set[_FT]]]: ... # type: ignore
def wait(fs: Iterable[_FT], *, timeout: float | None = ..., return_when: str = ...) -> Future[tuple[set[_FT], set[_FT]]]: ... # type: ignore[misc]
@overload
def wait(
fs: Iterable[Awaitable[_T]], *, timeout: float | None = ..., return_when: str = ...
@@ -243,7 +243,9 @@ else:
def shield(arg: _FutureT[_T], *, loop: AbstractEventLoop | None = ...) -> Future[_T]: ...
def sleep(delay: float, result: _T = ..., *, loop: AbstractEventLoop | None = ...) -> Future[_T]: ...
@overload
def wait(fs: Iterable[_FT], *, loop: AbstractEventLoop | None = ..., timeout: float | None = ..., return_when: str = ...) -> Future[tuple[set[_FT], set[_FT]]]: ... # type: ignore
def wait( # type: ignore[misc]
fs: Iterable[_FT], *, loop: AbstractEventLoop | None = ..., timeout: float | None = ..., return_when: str = ...
) -> Future[tuple[set[_FT], set[_FT]]]: ...
@overload
def wait(
fs: Iterable[Awaitable[_T]], *, loop: AbstractEventLoop | None = ..., timeout: float | None = ..., return_when: str = ...
+1 -1
View File
@@ -111,7 +111,7 @@ class BZ2File(BaseStream, IO[bytes]):
) -> 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: ...
+2 -2
View File
@@ -53,11 +53,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: ... # type: ignore[misc]
@overload
def encode(obj: str, encoding: str = ..., errors: str = ...) -> bytes: ...
@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 = ...) -> str: ...
@overload
+7 -7
View File
@@ -95,9 +95,9 @@ class UserString(Sequence[str]):
def __contains__(self, char: object) -> bool: ...
def __len__(self) -> int: ...
# It should return a str to implement Sequence correctly, but it doesn't.
def __getitem__(self: _UserStringT, i: int | slice) -> _UserStringT: ... # type: ignore
def __iter__(self: _UserStringT) -> Iterator[_UserStringT]: ... # type: ignore
def __reversed__(self: _UserStringT) -> Iterator[_UserStringT]: ... # type: ignore
def __getitem__(self: _UserStringT, i: int | slice) -> _UserStringT: ... # type: ignore[override]
def __iter__(self: _UserStringT) -> Iterator[_UserStringT]: ... # type: ignore[override]
def __reversed__(self: _UserStringT) -> Iterator[_UserStringT]: ... # type: ignore[override]
def __add__(self: _UserStringT, other: object) -> _UserStringT: ...
def __mul__(self: _UserStringT, n: int) -> _UserStringT: ...
def __mod__(self: _UserStringT, args: Any) -> _UserStringT: ...
@@ -170,7 +170,7 @@ class deque(MutableSequence[_T], Generic[_T]):
def extendleft(self, __iterable: Iterable[_T]) -> None: ...
def insert(self, __i: int, __x: _T) -> None: ...
def index(self, __x: _T, __start: int = ..., __stop: int = ...) -> int: ...
def pop(self) -> _T: ... # type: ignore
def pop(self) -> _T: ... # type: ignore[override]
def popleft(self) -> _T: ...
def remove(self, __value: _T) -> None: ...
def reverse(self) -> None: ...
@@ -212,7 +212,7 @@ class Counter(Dict[_T, int], Generic[_T]):
def elements(self) -> Iterator[_T]: ...
def most_common(self, n: int | None = ...) -> list[tuple[_T, int]]: ...
@classmethod
def fromkeys(cls, iterable: Any, v: int | None = ...) -> NoReturn: ... # type: ignore
def fromkeys(cls, iterable: Any, v: int | None = ...) -> NoReturn: ... # type: ignore[override]
@overload
def subtract(self, __iterable: None = ...) -> None: ...
@overload
@@ -233,13 +233,13 @@ class Counter(Dict[_T, int], Generic[_T]):
def __add__(self, other: Counter[_T]) -> Counter[_T]: ...
def __sub__(self, other: Counter[_T]) -> Counter[_T]: ...
def __and__(self, other: Counter[_T]) -> Counter[_T]: ...
def __or__(self, other: Counter[_T]) -> Counter[_T]: ... # type: ignore
def __or__(self, other: Counter[_T]) -> Counter[_T]: ... # type: ignore[override]
def __pos__(self) -> Counter[_T]: ...
def __neg__(self) -> Counter[_T]: ...
def __iadd__(self, other: Counter[_T]) -> Counter[_T]: ...
def __isub__(self, other: Counter[_T]) -> Counter[_T]: ...
def __iand__(self, other: Counter[_T]) -> Counter[_T]: ...
def __ior__(self, other: Counter[_T]) -> Counter[_T]: ... # type: ignore
def __ior__(self, other: Counter[_T]) -> Counter[_T]: ... # type: ignore[override]
@final
class _OrderedDictKeysView(dict_keys[_KT_co, _VT_co], Reversible[_KT_co]): # type: ignore[misc]
+11 -2
View File
@@ -122,7 +122,7 @@ class RawConfigParser(_parser):
fallback: _T = ...,
) -> _T: ...
# This is incompatible with MutableMapping so we ignore the type
@overload # type: ignore
@overload # type: ignore[override]
def get(self, section: str, option: str, *, raw: bool = ..., vars: _section | None = ...) -> str: ...
@overload
def get(self, section: str, option: str, *, raw: bool = ..., vars: _section | None = ..., fallback: _T) -> str | _T: ...
@@ -153,7 +153,16 @@ class SectionProxy(MutableMapping[str, str]):
def parser(self) -> RawConfigParser: ...
@property
def name(self) -> str: ...
def get(self, option: str, fallback: str | None = ..., *, raw: bool = ..., vars: _section | None = ..., _impl: Any | None = ..., **kwargs: Any) -> str: ... # type: ignore
def get( # type: ignore[override]
self,
option: str,
fallback: str | None = ...,
*,
raw: bool = ...,
vars: _section | None = ...,
_impl: Any | None = ...,
**kwargs: Any,
) -> str: ...
# These are partially-applied version of the methods with the same names in
# RawConfigParser; the stubs should be kept updated together
@overload
+2 -2
View File
@@ -36,10 +36,10 @@ class _GeneratorContextManager(AbstractContextManager[_T_co]):
def __call__(self, func: _F) -> _F: ...
# type ignore to deal with incomplete ParamSpec support in mypy
def contextmanager(func: Callable[_P, Iterator[_T]]) -> Callable[_P, _GeneratorContextManager[_T]]: ... # type: ignore
def contextmanager(func: Callable[_P, Iterator[_T]]) -> Callable[_P, _GeneratorContextManager[_T]]: ... # type: ignore[misc]
if sys.version_info >= (3, 7):
def asynccontextmanager(func: Callable[_P, AsyncIterator[_T]]) -> Callable[_P, AbstractAsyncContextManager[_T]]: ... # type: ignore
def asynccontextmanager(func: Callable[_P, AsyncIterator[_T]]) -> Callable[_P, AbstractAsyncContextManager[_T]]: ... # type: ignore[misc]
class _SupportsClose(Protocol):
def close(self) -> object: ...
+2 -2
View File
@@ -76,8 +76,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
+4 -4
View File
@@ -276,10 +276,10 @@ 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]
if sys.version_info >= (3, 8):
@overload # type: ignore[override]
def __sub__(self: _D, __other: timedelta) -> _D: ...
+2 -2
View File
@@ -31,7 +31,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: ...
+2 -2
View File
@@ -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: ...
+1 -3
View File
@@ -34,9 +34,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 = ...
+1 -1
View File
@@ -5,7 +5,7 @@ from ..cmd import Command
_Reporter = Any # really docutils.utils.Reporter
# Only defined if docutils is installed.
class SilentReporter(_Reporter): # type: ignore
class SilentReporter(_Reporter):
messages: Any
def __init__(
self,
+1 -1
View File
@@ -334,7 +334,7 @@ class Terminal(str):
def pop_trailing_ws(self) -> None: ...
@property
def comments(self) -> list[str]: ...
def __getnewargs__(self) -> tuple[str, str]: ... # type: ignore
def __getnewargs__(self) -> tuple[str, str]: ... # type: ignore[override]
class WhiteSpaceTerminal(Terminal):
@property
+1 -1
View File
@@ -30,7 +30,7 @@ class Policy:
class Compat32(Policy):
def header_source_parse(self, sourcelines: list[str]) -> tuple[str, str]: ...
def header_store_parse(self, name: str, value: str) -> tuple[str, str]: ...
def header_fetch_parse(self, name: str, value: str) -> str | Header: ... # type: ignore
def header_fetch_parse(self, name: str, value: str) -> str | Header: ... # type: ignore[override]
def fold(self, name: str, value: str) -> str: ...
def fold_binary(self, name: str, value: str) -> bytes: ...
+1 -1
View File
@@ -59,7 +59,7 @@ class auto(IntFlag):
def __new__(cls: Type[_T]) -> _T: ...
class Flag(Enum):
name: str | None # type: ignore
name: str | None # type: ignore[assignment]
value: int
def __contains__(self: _T, other: _T) -> bool: ...
def __repr__(self) -> str: ...
+1 -1
View File
@@ -96,7 +96,7 @@ class HTTPResponse(io.BufferedIOBase, BinaryIO):
def read(self, amt: int | None = ...) -> bytes: ...
def read1(self, n: int = ...) -> bytes: ...
def readinto(self, b: WriteableBuffer) -> int: ...
def readline(self, limit: int = ...) -> bytes: ... # type: ignore
def readline(self, limit: int = ...) -> bytes: ... # type: ignore[override]
@overload
def getheader(self, name: str) -> str | None: ...
@overload
+1 -1
View File
@@ -29,7 +29,7 @@ class Morsel(Dict[str, Any], Generic[_T]):
def set(self, key: str, val: str, coded_val: _T, LegalChars: str = ...) -> None: ...
def setdefault(self, key: str, val: str | None = ...) -> str: ...
# The dict update can also get a keywords argument so this is incompatible
@overload # type: ignore
@overload # type: ignore[override]
def update(self, values: Mapping[str, str]) -> None: ...
@overload
def update(self, values: Iterable[tuple[str, str]]) -> None: ...
+3 -3
View File
@@ -7,9 +7,9 @@ from typing_extensions import ParamSpec
_P = ParamSpec("_P")
def module_for_loader(fxn: Callable[_P, types.ModuleType]) -> Callable[_P, types.ModuleType]: ... # type: ignore
def set_loader(fxn: Callable[_P, types.ModuleType]) -> Callable[_P, types.ModuleType]: ... # type: ignore
def set_package(fxn: Callable[_P, types.ModuleType]) -> Callable[_P, types.ModuleType]: ... # type: ignore
def module_for_loader(fxn: Callable[_P, types.ModuleType]) -> Callable[_P, types.ModuleType]: ... # type: ignore[misc]
def set_loader(fxn: Callable[_P, types.ModuleType]) -> Callable[_P, types.ModuleType]: ... # type: ignore[misc]
def set_package(fxn: Callable[_P, types.ModuleType]) -> Callable[_P, types.ModuleType]: ... # type: ignore[misc]
def resolve_name(name: str, package: str | None) -> str: ...
MAGIC_NUMBER: bytes
+2 -2
View File
@@ -331,7 +331,7 @@ class Traceback(NamedTuple):
lineno: int
function: str
code_context: list[str] | None
index: int | None # type: ignore
index: int | None # type: ignore[assignment]
class FrameInfo(NamedTuple):
frame: FrameType
@@ -339,7 +339,7 @@ class FrameInfo(NamedTuple):
lineno: int
function: str
code_context: list[str] | None
index: int | None # type: ignore
index: int | None # type: ignore[assignment]
def getframeinfo(frame: FrameType | TracebackType, context: int = ...) -> Traceback: ...
def getouterframes(frame: Any, context: int = ...) -> list[FrameInfo]: ...
+14 -14
View File
@@ -65,7 +65,7 @@ class BufferedIOBase(IOBase):
class FileIO(RawIOBase, BinaryIO):
mode: str
name: StrOrBytesPath | int # type: ignore
name: StrOrBytesPath | int # type: ignore[assignment]
def __init__(
self, file: StrOrBytesPath | int, mode: str = ..., closefd: bool = ..., opener: _Opener | None = ...
) -> None: ...
@@ -87,7 +87,7 @@ class BytesIO(BufferedIOBase, BinaryIO):
if sys.version_info >= (3, 7):
def read1(self, __size: int | None = ...) -> bytes: ...
else:
def read1(self, __size: int | None) -> bytes: ... # type: ignore
def read1(self, __size: int | None) -> bytes: ... # type: ignore[override]
class BufferedReader(BufferedIOBase, BinaryIO):
def __enter__(self: Self) -> Self: ...
@@ -96,7 +96,7 @@ class BufferedReader(BufferedIOBase, BinaryIO):
if sys.version_info >= (3, 7):
def read1(self, __size: int = ...) -> bytes: ...
else:
def read1(self, __size: int) -> bytes: ... # type: ignore
def read1(self, __size: int) -> bytes: ... # type: ignore[override]
class BufferedWriter(BufferedIOBase, BinaryIO):
def __enter__(self: Self) -> Self: ...
@@ -110,7 +110,7 @@ class BufferedRandom(BufferedReader, BufferedWriter):
if sys.version_info >= (3, 7):
def read1(self, __size: int = ...) -> bytes: ...
else:
def read1(self, __size: int) -> bytes: ... # type: ignore
def read1(self, __size: int) -> bytes: ... # type: ignore[override]
class BufferedRWPair(BufferedIOBase):
def __init__(self, reader: RawIOBase, writer: RawIOBase, buffer_size: int = ...) -> None: ...
@@ -120,13 +120,13 @@ class TextIOBase(IOBase):
encoding: str
errors: str | None
newlines: str | Tuple[str, ...] | None
def __iter__(self) -> Iterator[str]: ... # type: ignore
def __next__(self) -> str: ... # type: ignore
def __iter__(self) -> Iterator[str]: ... # type: ignore[override]
def __next__(self) -> str: ... # type: ignore[override]
def detach(self) -> BinaryIO: ...
def write(self, __s: str) -> int: ...
def writelines(self, __lines: Iterable[str]) -> None: ... # type: ignore
def readline(self, __size: int = ...) -> str: ... # type: ignore
def readlines(self, __hint: int = ...) -> list[str]: ... # type: ignore
def writelines(self, __lines: Iterable[str]) -> None: ... # type: ignore[override]
def readline(self, __size: int = ...) -> str: ... # type: ignore[override]
def readlines(self, __hint: int = ...) -> list[str]: ... # type: ignore[override]
def read(self, __size: int | None = ...) -> str: ...
def tell(self) -> int: ...
@@ -160,11 +160,11 @@ class TextIOWrapper(TextIOBase, TextIO):
) -> None: ...
# These are inherited from TextIOBase, but must exist in the stub to satisfy mypy.
def __enter__(self: Self) -> Self: ...
def __iter__(self) -> Iterator[str]: ... # type: ignore
def __next__(self) -> str: ... # type: ignore
def writelines(self, __lines: Iterable[str]) -> None: ... # type: ignore
def readline(self, __size: int = ...) -> str: ... # type: ignore
def readlines(self, __hint: int = ...) -> list[str]: ... # type: ignore
def __iter__(self) -> Iterator[str]: ... # type: ignore[override]
def __next__(self) -> str: ... # type: ignore[override]
def writelines(self, __lines: Iterable[str]) -> None: ... # type: ignore[override]
def readline(self, __size: int = ...) -> str: ... # type: ignore[override]
def readlines(self, __hint: int = ...) -> list[str]: ... # type: ignore[override]
def seek(self, __cookie: int, __whence: int = ...) -> int: ...
class StringIO(TextIOWrapper):
+1 -1
View File
@@ -128,7 +128,7 @@ class SocketHandler(Handler):
def createSocket(self) -> None: ...
class DatagramHandler(SocketHandler):
def makeSocket(self) -> socket: ... # type: ignore
def makeSocket(self) -> socket: ... # type: ignore[override]
class SysLogHandler(Handler):
LOG_EMERG: int
+1 -1
View File
@@ -103,7 +103,7 @@ def pow(__x: _SupportsFloatOrIndex, __y: _SupportsFloatOrIndex) -> float: ...
if sys.version_info >= (3, 8):
@overload
def prod(__iterable: Iterable[SupportsIndex], *, start: SupportsIndex = ...) -> int: ... # type: ignore
def prod(__iterable: Iterable[SupportsIndex], *, start: SupportsIndex = ...) -> int: ... # type: ignore[misc]
@overload
def prod(__iterable: Iterable[_SupportsFloatOrIndex], *, start: _SupportsFloatOrIndex = ...) -> float: ...
+2 -2
View File
@@ -210,7 +210,7 @@ class _Environ(MutableMapping[AnyStr, AnyStr], Generic[AnyStr]):
putenv: Callable[[AnyStr, AnyStr], None],
unsetenv: Callable[[AnyStr, AnyStr], None],
) -> None: ...
def setdefault(self, key: AnyStr, value: AnyStr) -> AnyStr: ... # type: ignore
def setdefault(self, key: AnyStr, value: AnyStr) -> AnyStr: ... # type: ignore[override]
def copy(self) -> dict[AnyStr, AnyStr]: ...
def __delitem__(self, key: AnyStr) -> None: ...
def __getitem__(self, key: AnyStr) -> AnyStr: ...
@@ -773,7 +773,7 @@ if sys.platform != "win32":
class _wrap_close(_TextIOWrapper):
def __init__(self, stream: _TextIOWrapper, proc: Popen[str]) -> None: ...
def close(self) -> int | None: ... # type: ignore
def close(self) -> int | None: ... # type: ignore[override]
def popen(cmd: str, mode: str = ..., buffering: int = ...) -> _wrap_close: ...
def spawnl(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: StrOrBytesPath) -> int: ...
+3 -7
View File
@@ -40,7 +40,7 @@ class SMTPChannel(asynchat.async_chat):
decode_data: bool = ...,
) -> None: ...
# base asynchat.async_chat.push() accepts bytes
def push(self, msg: str) -> None: ... # type: ignore
def push(self, msg: str) -> None: ... # type: ignore[override]
def collect_incoming_data(self, data: bytes) -> None: ...
def found_terminator(self) -> None: ...
def smtp_HELO(self, arg: str) -> None: ...
@@ -77,11 +77,7 @@ class SMTPServer(asyncore.dispatcher):
class DebuggingServer(SMTPServer): ...
class PureProxy(SMTPServer):
def process_message( # type: ignore
self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str
) -> str | None: ...
def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str) -> str | None: ... # type: ignore[override]
class MailmanProxy(PureProxy):
def process_message( # type: ignore
self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str
) -> str | None: ...
def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str) -> str | None: ... # type: ignore[override]
+3 -3
View File
@@ -570,9 +570,9 @@ class socket(_socket.socket):
) -> BinaryIO: ...
def sendfile(self, file: BinaryIO, offset: int = ..., count: int | None = ...) -> int: ...
@property
def family(self) -> AddressFamily: ... # type: ignore
def family(self) -> AddressFamily: ... # type: ignore[override]
@property
def type(self) -> SocketKind: ... # type: ignore
def type(self) -> SocketKind: ... # type: ignore[override]
def get_inheritable(self) -> bool: ...
def set_inheritable(self, inheritable: bool) -> None: ...
@@ -593,7 +593,7 @@ if sys.platform == "win32":
def socketpair(family: int = ..., type: int = ..., proto: int = ...) -> tuple[socket, socket]: ...
else:
def socketpair( # type: ignore
def socketpair(
family: int | AddressFamily | None = ..., type: SocketType | int = ..., proto: int = ...
) -> tuple[socket, socket]: ...
+7 -7
View File
@@ -1136,7 +1136,7 @@ class Canvas(Widget, XView, YView):
# Canvas.bbox() args are `str | _CanvasItemId`, but mypy rejects that
# description because it's incompatible with Misc.bbox(), an alias for
# Misc.grid_bbox(). Yes it is, but there's not much we can do about it.
def bbox(self, *args: str | _CanvasItemId) -> tuple[int, int, int, int]: ... # type: ignore
def bbox(self, *args: str | _CanvasItemId) -> tuple[int, int, int, int]: ... # type: ignore[override]
@overload
def tag_bind(
self,
@@ -1506,10 +1506,10 @@ class Canvas(Widget, XView, YView):
#
# But mypy doesn't like aliasing here (maybe because Misc defines the same names)
def tag_lower(self, __first: str | _CanvasItemId, __second: str | _CanvasItemId | None = ...) -> None: ...
def lower(self, __first: str | _CanvasItemId, __second: str | _CanvasItemId | None = ...) -> None: ... # type: ignore
def lower(self, __first: str | _CanvasItemId, __second: str | _CanvasItemId | None = ...) -> None: ... # type: ignore[override]
def tag_raise(self, __first: str | _CanvasItemId, __second: str | _CanvasItemId | None = ...) -> None: ...
def tkraise(self, __first: str | _CanvasItemId, __second: str | _CanvasItemId | None = ...) -> None: ... # type: ignore
def lift(self, __first: str | _CanvasItemId, __second: str | _CanvasItemId | None = ...) -> None: ... # type: ignore
def tkraise(self, __first: str | _CanvasItemId, __second: str | _CanvasItemId | None = ...) -> None: ... # type: ignore[override]
def lift(self, __first: str | _CanvasItemId, __second: str | _CanvasItemId | None = ...) -> None: ... # type: ignore[override]
def scale(self, *args): ...
def scan_mark(self, x, y): ...
def scan_dragto(self, x, y, gain: int = ...): ...
@@ -1738,7 +1738,7 @@ class Entry(Widget, XView):
def scan_mark(self, x): ...
def scan_dragto(self, x): ...
def selection_adjust(self, index: _EntryIndex) -> None: ...
def selection_clear(self) -> None: ... # type: ignore
def selection_clear(self) -> None: ... # type: ignore[override]
def selection_from(self, index: _EntryIndex) -> None: ...
def selection_present(self) -> bool: ...
def selection_range(self, start: _EntryIndex, end: _EntryIndex) -> None: ...
@@ -1984,7 +1984,7 @@ class Listbox(Widget, XView, YView):
def see(self, index): ...
def selection_anchor(self, index): ...
select_anchor: Any
def selection_clear(self, first, last: Any | None = ...): ... # type: ignore
def selection_clear(self, first, last: Any | None = ...): ... # type: ignore[override]
select_clear: Any
def selection_includes(self, index): ...
select_includes: Any
@@ -2794,7 +2794,7 @@ class Text(Widget, XView, YView):
@overload
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
config = configure
def bbox(self, index: _TextIndex) -> tuple[int, int, int, int] | None: ... # type: ignore
def bbox(self, index: _TextIndex) -> tuple[int, int, int, int] | None: ... # type: ignore[override]
def compare(self, index1: _TextIndex, op: Literal["<", "<=", "==", ">=", ">", "!="], index2: _TextIndex) -> bool: ...
def count(self, index1, index2, *args): ... # TODO
@overload
+1 -1
View File
@@ -266,7 +266,7 @@ class PanedWindow(TixWidget):
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
def add(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
def delete(self, name: str) -> None: ...
def forget(self, name: str) -> None: ... # type: ignore
def forget(self, name: str) -> None: ... # type: ignore[override]
def panecget(self, entry: str, opt: Any) -> Any: ...
def paneconfigure(self, entry: str, cnf: dict[str, Any] = ..., **kw: Any) -> Any | None: ...
def panes(self) -> list[tkinter.Widget]: ...
+14 -14
View File
@@ -158,7 +158,7 @@ class Entry(Widget, tkinter.Entry):
width: int = ...,
xscrollcommand: tkinter._XYScrollCommand = ...,
) -> None: ...
@overload # type: ignore
@overload # type: ignore[override]
def configure(
self,
cnf: dict[str, Any] | None = ...,
@@ -183,7 +183,7 @@ class Entry(Widget, tkinter.Entry):
@overload
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
# config must be copy/pasted, otherwise ttk.Entry().config is mypy error (don't know why)
@overload # type: ignore
@overload # type: ignore[override]
def config(
self,
cnf: dict[str, Any] | None = ...,
@@ -238,7 +238,7 @@ class Combobox(Entry):
width: int = ...,
xscrollcommand: tkinter._XYScrollCommand = ..., # undocumented
) -> None: ...
@overload # type: ignore
@overload # type: ignore[override]
def configure(
self,
cnf: dict[str, Any] | None = ...,
@@ -266,7 +266,7 @@ class Combobox(Entry):
@overload
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
# config must be copy/pasted, otherwise ttk.Combobox().config is mypy error (don't know why)
@overload # type: ignore
@overload # type: ignore[override]
def config(
self,
cnf: dict[str, Any] | None = ...,
@@ -547,7 +547,7 @@ class Panedwindow(Widget, tkinter.PanedWindow):
width: int = ...,
) -> None: ...
def add(self, child: tkinter.Widget, *, weight: int = ..., **kw) -> None: ...
@overload # type: ignore
@overload # type: ignore[override]
def configure(
self,
cnf: dict[str, Any] | None = ...,
@@ -561,7 +561,7 @@ class Panedwindow(Widget, tkinter.PanedWindow):
@overload
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
# config must be copy/pasted, otherwise ttk.Panedwindow().config is mypy error (don't know why)
@overload # type: ignore
@overload # type: ignore[override]
def config(
self,
cnf: dict[str, Any] | None = ...,
@@ -688,7 +688,7 @@ class Scale(Widget, tkinter.Scale):
value: float = ...,
variable: tkinter.IntVar | tkinter.DoubleVar = ...,
) -> None: ...
@overload # type: ignore
@overload # type: ignore[override]
def configure(
self,
cnf: dict[str, Any] | None = ...,
@@ -708,7 +708,7 @@ class Scale(Widget, tkinter.Scale):
@overload
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
# config must be copy/pasted, otherwise ttk.Scale().config is mypy error (don't know why)
@overload # type: ignore
@overload # type: ignore[override]
def config(
self,
cnf: dict[str, Any] | None = ...,
@@ -742,7 +742,7 @@ class Scrollbar(Widget, tkinter.Scrollbar):
style: str = ...,
takefocus: tkinter._TakeFocusValue = ...,
) -> None: ...
@overload # type: ignore
@overload # type: ignore[override]
def configure(
self,
cnf: dict[str, Any] | None = ...,
@@ -756,7 +756,7 @@ class Scrollbar(Widget, tkinter.Scrollbar):
@overload
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
# config must be copy/pasted, otherwise ttk.Scrollbar().config is mypy error (don't know why)
@overload # type: ignore
@overload # type: ignore[override]
def config(
self,
cnf: dict[str, Any] | None = ...,
@@ -852,7 +852,7 @@ if sys.version_info >= (3, 7):
wrap: bool = ...,
xscrollcommand: tkinter._XYScrollCommand = ...,
) -> None: ...
@overload # type: ignore
@overload # type: ignore[override]
def configure(
self,
cnf: dict[str, Any] | None = ...,
@@ -883,7 +883,7 @@ if sys.version_info >= (3, 7):
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
@overload
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
config = configure # type: ignore
config = configure # type: ignore[assignment]
def set(self, value: Any) -> None: ...
class _TreeviewItemDict(TypedDict):
@@ -959,7 +959,7 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
@overload
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
config = configure
def bbox(self, item, column: _TreeviewColumnId | None = ...) -> tuple[int, int, int, int] | Literal[""]: ... # type: ignore
def bbox(self, item, column: _TreeviewColumnId | None = ...) -> tuple[int, int, int, int] | Literal[""]: ... # type: ignore[override]
def get_children(self, item: str | None = ...) -> Tuple[str, ...]: ...
def set_children(self, item: str, *newchildren: str) -> None: ...
@overload
@@ -987,7 +987,7 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
def delete(self, *items: str) -> None: ...
def detach(self, *items: str) -> None: ...
def exists(self, item: str) -> bool: ...
@overload # type: ignore
@overload # type: ignore[override]
def focus(self, item: None = ...) -> str: ... # can return empty string
@overload
def focus(self, item: str) -> Literal[""]: ...
+6 -6
View File
@@ -178,7 +178,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,
@@ -220,7 +220,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 = ...
@@ -231,7 +231,7 @@ class RawTurtle(TPen, TNavigator):
def shearfactor(self, shear: float) -> None: ...
# Unsafely overlaps when no arguments are provided
@overload
def shapetransform(self) -> tuple[float, float, float, float]: ... # type: ignore
def shapetransform(self) -> tuple[float, float, float, float]: ... # type: ignore[misc]
@overload
def shapetransform(
self, t11: float | None = ..., t12: float | None = ..., t21: float | None = ..., t22: float | None = ...
@@ -449,7 +449,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 = ...,
@@ -485,7 +485,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: ...
@overload
@@ -495,7 +495,7 @@ def shearfactor(shear: float) -> None: ...
# Unsafely overlaps when no arguments are provided
@overload
def shapetransform() -> tuple[float, float, float, float]: ... # type: ignore
def shapetransform() -> tuple[float, float, float, float]: ... # type: ignore[misc]
@overload
def shapetransform(
t11: float | None = ..., t12: float | None = ..., t21: float | None = ..., t22: float | None = ...
+5 -5
View File
@@ -36,7 +36,7 @@ _V_co = TypeVar("_V_co", covariant=True)
@final
class _Cell:
__hash__: None # type: ignore
__hash__: None # type: ignore[assignment]
cell_contents: Any
@final
@@ -149,7 +149,7 @@ class CodeType:
@final
class MappingProxyType(Mapping[_KT, _VT_co], Generic[_KT, _VT_co]):
__hash__: None # type: ignore
__hash__: None # type: ignore[assignment]
def __init__(self, mapping: Mapping[_KT, _VT_co]) -> None: ...
def __getitem__(self, k: _KT) -> _VT_co: ...
def __iter__(self) -> Iterator[_KT]: ...
@@ -165,7 +165,7 @@ class MappingProxyType(Mapping[_KT, _VT_co], Generic[_KT, _VT_co]):
def __ror__(self, __value: Mapping[_T1, _T2]) -> dict[_KT | _T1, _VT_co | _T2]: ...
class SimpleNamespace:
__hash__: None # type: ignore
__hash__: None # type: ignore[assignment]
def __init__(self, **kwargs: Any) -> None: ...
def __getattribute__(self, name: str) -> Any: ...
def __setattr__(self, name: str, value: Any) -> None: ...
@@ -382,9 +382,9 @@ _P = ParamSpec("_P")
# it's not really an Awaitable, but can be used in an await expression. Real type: Generator & Awaitable
@overload
def coroutine(func: Callable[_P, Generator[_R, Any, Any]]) -> Callable[_P, Awaitable[_R]]: ... # type: ignore
def coroutine(func: Callable[_P, Generator[_R, Any, Any]]) -> Callable[_P, Awaitable[_R]]: ... # type: ignore[misc]
@overload
def coroutine(func: _Fn) -> _Fn: ... # type: ignore
def coroutine(func: _Fn) -> _Fn: ... # type: ignore[misc]
if sys.version_info >= (3, 8):
CellType = _Cell
+1 -1
View File
@@ -96,7 +96,7 @@ _T_contra = TypeVar("_T_contra", contravariant=True) # Ditto contravariant.
_TC = TypeVar("_TC", bound=Type[object])
def no_type_check(arg: _F) -> _F: ...
def no_type_check_decorator(decorator: Callable[_P, _T]) -> Callable[_P, _T]: ... # type: ignore
def no_type_check_decorator(decorator: Callable[_P, _T]) -> Callable[_P, _T]: ... # type: ignore[misc]
# Type aliases and type constructors
+6 -6
View File
@@ -81,7 +81,7 @@ class TestCase:
def assertLess(self, a: Any, b: Any, msg: Any = ...) -> None: ...
def assertLessEqual(self, a: Any, b: Any, msg: Any = ...) -> None: ...
@overload
def assertRaises( # type: ignore
def assertRaises( # type: ignore[misc]
self,
expected_exception: Type[BaseException] | Tuple[Type[BaseException], ...],
callable: Callable[..., Any],
@@ -91,7 +91,7 @@ class TestCase:
@overload
def assertRaises(self, expected_exception: Type[_E] | Tuple[Type[_E], ...], msg: Any = ...) -> _AssertRaisesContext[_E]: ...
@overload
def assertRaisesRegex( # type: ignore
def assertRaisesRegex( # type: ignore[misc]
self,
expected_exception: Type[BaseException] | Tuple[Type[BaseException], ...],
expected_regex: str | bytes | Pattern[str] | Pattern[bytes],
@@ -107,13 +107,13 @@ class TestCase:
msg: Any = ...,
) -> _AssertRaisesContext[_E]: ...
@overload
def assertWarns( # type: ignore
def assertWarns( # type: ignore[misc]
self, expected_warning: Type[Warning] | Tuple[Type[Warning], ...], callable: Callable[..., Any], *args: Any, **kwargs: Any
) -> None: ...
@overload
def assertWarns(self, expected_warning: Type[Warning] | Tuple[Type[Warning], ...], msg: Any = ...) -> _AssertWarnsContext: ...
@overload
def assertWarnsRegex( # type: ignore
def assertWarnsRegex( # type: ignore[misc]
self,
expected_warning: Type[Warning] | Tuple[Type[Warning], ...],
expected_regex: str | bytes | Pattern[str] | Pattern[bytes],
@@ -195,7 +195,7 @@ class TestCase:
def assert_(self, expr: bool, msg: Any = ...) -> None: ...
def failIf(self, expr: bool, msg: Any = ...) -> None: ...
@overload
def failUnlessRaises( # type: ignore
def failUnlessRaises( # type: ignore[misc]
self,
exception: Type[BaseException] | Tuple[Type[BaseException], ...],
callable: Callable[..., Any] = ...,
@@ -215,7 +215,7 @@ class TestCase:
def assertRegexpMatches(self, text: AnyStr, regex: AnyStr | Pattern[AnyStr], msg: Any = ...) -> None: ...
def assertNotRegexpMatches(self, text: AnyStr, regex: AnyStr | Pattern[AnyStr], msg: Any = ...) -> None: ...
@overload
def assertRaisesRegexp( # type: ignore
def assertRaisesRegexp( # type: ignore[misc]
self,
exception: Type[BaseException] | Tuple[Type[BaseException], ...],
expected_regex: str | bytes | Pattern[str] | Pattern[bytes],
+9 -9
View File
@@ -71,7 +71,7 @@ class _MockIter:
class Base:
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
class NonCallableMock(Base, Any): # type: ignore
class NonCallableMock(Base, Any):
def __new__(__cls, *args: Any, **kw: Any) -> NonCallableMock: ...
def __init__(
self,
@@ -210,7 +210,7 @@ class _patcher:
# Ideally we'd be able to add an overload for it so that the return type is _patch[MagicMock],
# but that's impossible with the current type system.
@overload
def __call__( # type: ignore
def __call__( # type: ignore[misc]
self,
target: Any,
new: _T,
@@ -222,7 +222,7 @@ class _patcher:
**kwargs: Any,
) -> _patch[_T]: ...
@overload
def __call__( # type: ignore
def __call__(
self,
target: Any,
*,
@@ -235,7 +235,7 @@ class _patcher:
) -> _patch[MagicMock | AsyncMock]: ...
else:
@overload
def __call__( # type: ignore
def __call__( # type: ignore[misc]
self,
target: Any,
new: _T,
@@ -247,7 +247,7 @@ class _patcher:
**kwargs: Any,
) -> _patch[_T]: ...
@overload
def __call__( # type: ignore
def __call__(
self,
target: Any,
*,
@@ -260,7 +260,7 @@ class _patcher:
) -> _patch[MagicMock]: ...
if sys.version_info >= (3, 8):
@overload
def object( # type: ignore
def object( # type: ignore[misc]
self,
target: Any,
attribute: str,
@@ -273,7 +273,7 @@ class _patcher:
**kwargs: Any,
) -> _patch[_T]: ...
@overload
def object( # type: ignore
def object(
self,
target: Any,
attribute: str,
@@ -287,7 +287,7 @@ class _patcher:
) -> _patch[MagicMock | AsyncMock]: ...
else:
@overload
def object( # type: ignore
def object( # type: ignore[misc]
self,
target: Any,
attribute: str,
@@ -300,7 +300,7 @@ class _patcher:
**kwargs: Any,
) -> _patch[_T]: ...
@overload
def object( # type: ignore
def object(
self,
target: Any,
attribute: str,
+1 -1
View File
@@ -11,4 +11,4 @@ def removeResult(result: unittest.result.TestResult) -> bool: ...
@overload
def removeHandler(method: None = ...) -> None: ...
@overload
def removeHandler(method: Callable[_P, _T]) -> Callable[_P, _T]: ... # type: ignore
def removeHandler(method: Callable[_P, _T]) -> Callable[_P, _T]: ... # type: ignore[misc]
+6 -6
View File
@@ -37,9 +37,9 @@ class WeakValueDictionary(MutableMapping[_KT, _VT]):
def __str__(self) -> str: ...
def copy(self) -> WeakValueDictionary[_KT, _VT]: ...
# These are incompatible with Mapping
def keys(self) -> Iterator[_KT]: ... # type: ignore
def values(self) -> Iterator[_VT]: ... # type: ignore
def items(self) -> Iterator[tuple[_KT, _VT]]: ... # type: ignore
def keys(self) -> Iterator[_KT]: ... # type: ignore[override]
def values(self) -> Iterator[_VT]: ... # type: ignore[override]
def items(self) -> Iterator[tuple[_KT, _VT]]: ... # type: ignore[override]
def itervaluerefs(self) -> Iterator[KeyedRef[_KT, _VT]]: ...
def valuerefs(self) -> list[KeyedRef[_KT, _VT]]: ...
def setdefault(self, key: _KT, default: _VT = ...) -> _VT: ...
@@ -68,9 +68,9 @@ class WeakKeyDictionary(MutableMapping[_KT, _VT]):
def __str__(self) -> str: ...
def copy(self) -> WeakKeyDictionary[_KT, _VT]: ...
# These are incompatible with Mapping
def keys(self) -> Iterator[_KT]: ... # type: ignore
def values(self) -> Iterator[_VT]: ... # type: ignore
def items(self) -> Iterator[tuple[_KT, _VT]]: ... # type: ignore
def keys(self) -> Iterator[_KT]: ... # type: ignore[override]
def values(self) -> Iterator[_VT]: ... # type: ignore[override]
def items(self) -> Iterator[tuple[_KT, _VT]]: ... # type: ignore[override]
def keyrefs(self) -> list[ref[_KT]]: ...
def setdefault(self, key: _KT, default: _VT = ...) -> _VT: ...
@overload
+1 -1
View File
@@ -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 -2
View File
@@ -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): ...
+1 -1
View File
@@ -68,7 +68,7 @@ class DateTime:
def __le__(self, other: _DateTimeComparable) -> bool: ...
def __gt__(self, other: _DateTimeComparable) -> bool: ...
def __ge__(self, other: _DateTimeComparable) -> bool: ...
def __eq__(self, other: _DateTimeComparable) -> bool: ... # type: ignore
def __eq__(self, other: _DateTimeComparable) -> bool: ... # type: ignore[override]
def make_comparable(self, other: _DateTimeComparable) -> tuple[str, str]: ... # undocumented
def timetuple(self) -> time.struct_time: ... # undocumented
def decode(self, data: Any) -> None: ...
+10 -1
View File
@@ -120,7 +120,16 @@ class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher):
def handle_request(self, request_text: str | None = ...) -> None: ...
class ServerHTMLDoc(pydoc.HTMLDoc): # undocumented
def docroutine(self, object: object, name: str, mod: str | None = ..., funcs: Mapping[str, str] = ..., classes: Mapping[str, str] = ..., methods: Mapping[str, str] = ..., cl: type | None = ...) -> str: ... # type: ignore
def docroutine( # type: ignore[override]
self,
object: object,
name: str,
mod: str | None = ...,
funcs: Mapping[str, str] = ...,
classes: Mapping[str, str] = ...,
methods: Mapping[str, str] = ...,
cl: type | None = ...,
) -> str: ...
def docserver(self, server_name: str, package_documentation: str, methods: dict[str, str]) -> str: ...
class XMLRPCDocGenerator: # undocumented
+2 -2
View File
@@ -97,10 +97,10 @@ class ZipExtFile(io.BufferedIOBase):
close_fileobj: Literal[False] = ...,
) -> 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 __repr__(self) -> str: ...
def peek(self, n: int = ...) -> bytes: ...
def read1(self, n: int | None) -> bytes: ... # type: ignore
def read1(self, n: int | None) -> bytes: ... # type: ignore[override]
if sys.version_info >= (3, 7):
def seek(self, offset: int, whence: int = ...) -> int: ...
+1 -1
View File
@@ -20,7 +20,7 @@ class Request(RequestBase, JSONMixin):
# case in its supertype.
# We would require something like https://github.com/python/typing/issues/241
@property
def max_content_length(self) -> int | None: ... # type: ignore
def max_content_length(self) -> int | None: ... # type: ignore[override]
@property
def endpoint(self) -> str | None: ...
@property
+3 -3
View File
@@ -10,15 +10,15 @@ concat: Any
_CallableT = TypeVar("_CallableT", bound=Callable[..., Any])
class _ContextFunction(Protocol[_CallableT]): # type: ignore
class _ContextFunction(Protocol[_CallableT]):
contextfunction: Literal[True]
__call__: _CallableT
class _EvalContextFunction(Protocol[_CallableT]): # type: ignore
class _EvalContextFunction(Protocol[_CallableT]):
evalcontextfunction: Literal[True]
__call__: _CallableT
class _EnvironmentFunction(Protocol[_CallableT]): # type: ignore
class _EnvironmentFunction(Protocol[_CallableT]):
environmentfunction: Literal[True]
__call__: _CallableT
+1 -1
View File
@@ -48,7 +48,7 @@ class Pattern:
class InlineProcessor(Pattern):
safe_mode: bool = ...
def __init__(self, pattern, md: Any | None = ...) -> None: ...
def handleMatch(self, m: Match[str], data) -> tuple[Element, int, int] | tuple[None, None, None]: ... # type: ignore
def handleMatch(self, m: Match[str], data) -> tuple[Element, int, int] | tuple[None, None, None]: ... # type: ignore[override]
class SimpleTextPattern(Pattern): ...
class SimpleTextInlineProcessor(InlineProcessor): ...
+5 -5
View File
@@ -11,13 +11,13 @@ class Markup(text_type):
def __html__(self) -> Markup: ...
def __add__(self, other: text_type) -> Markup: ...
def __radd__(self, other: text_type) -> Markup: ...
def __mul__(self, num: int) -> Markup: ... # type: ignore
def __rmul__(self, num: int) -> Markup: ... # type: ignore
def __mul__(self, num: int) -> Markup: ... # type: ignore[override]
def __rmul__(self, num: int) -> Markup: ... # type: ignore[override]
def __mod__(self, *args: Any) -> Markup: ...
def join(self, seq: Iterable[text_type]) -> Markup: ...
def split(self, sep: text_type | None = ..., maxsplit: SupportsIndex = ...) -> list[Markup]: ... # type: ignore
def rsplit(self, sep: text_type | None = ..., maxsplit: SupportsIndex = ...) -> list[Markup]: ... # type: ignore
def splitlines(self, keepends: bool = ...) -> list[Markup]: ... # type: ignore
def split(self, sep: text_type | None = ..., maxsplit: SupportsIndex = ...) -> list[Markup]: ... # type: ignore[override]
def rsplit(self, sep: text_type | None = ..., maxsplit: SupportsIndex = ...) -> list[Markup]: ... # type: ignore[override]
def splitlines(self, keepends: bool = ...) -> list[Markup]: ... # type: ignore[override]
def unescape(self) -> Text: ...
def striptags(self) -> Text: ...
@classmethod
+1 -1
View File
@@ -15,7 +15,7 @@ def fromqimage(im: Image | QImage) -> Image: ...
def fromqpixmap(im: Image | QImage) -> Image: ...
def align8to32(bytes: bytes, width: int, mode: Literal["1", "L", "P"]) -> bytes: ...
class ImageQt(QImage): # type: ignore
class ImageQt(QImage):
def __init__(self, im: Image) -> None: ...
def toqimage(im: Image) -> ImageQt: ...
+4 -4
View File
@@ -40,11 +40,11 @@ class DictCursorMixin:
def __iter__(self) -> Iterator[dict[Text, Any]]: ...
class SSCursor(Cursor):
def fetchall(self) -> list[Tuple[Any, ...]]: ... # type: ignore
def fetchall(self) -> list[Tuple[Any, ...]]: ... # type: ignore[override]
def fetchall_unbuffered(self) -> Iterator[Tuple[Any, ...]]: ...
def scroll(self, value: int, mode: Text = ...) -> None: ...
class DictCursor(DictCursorMixin, Cursor): ... # type: ignore
class DictCursor(DictCursorMixin, Cursor): ... # type: ignore[misc]
class SSDictCursor(DictCursorMixin, SSCursor): # type: ignore
def fetchall_unbuffered(self) -> Iterator[dict[Text, Any]]: ... # type: ignore
class SSDictCursor(DictCursorMixin, SSCursor): # type: ignore[misc]
def fetchall_unbuffered(self) -> Iterator[dict[Text, Any]]: ... # type: ignore[override]
+3 -1
View File
@@ -89,7 +89,9 @@ class LexerContext:
def __init__(self, text, pos, stack: Any | None = ..., end: Any | None = ...) -> None: ...
class ExtendedRegexLexer(RegexLexer):
def get_tokens_unprocessed(self, text: str | None = ..., context: LexerContext | None = ...) -> Iterator[tuple[int, _TokenType, str]]: ... # type: ignore
def get_tokens_unprocessed( # type: ignore[override]
self, text: str | None = ..., context: LexerContext | None = ...
) -> Iterator[tuple[int, _TokenType, str]]: ...
class ProfilingRegexLexerMeta(RegexLexerMeta): ...
+1 -1
View File
@@ -6,7 +6,7 @@ class _TokenType(Tuple[str]): # TODO: change to lower-case tuple once new mypy
def split(self) -> list[_TokenType]: ...
subtypes: set[_TokenType]
def __init__(self, *args: str) -> None: ...
def __contains__(self, val: _TokenType) -> bool: ... # type: ignore
def __contains__(self, val: _TokenType) -> bool: ... # type: ignore[override]
def __getattr__(self, name: str) -> _TokenType: ...
def __copy__(self): ...
def __deepcopy__(self, memo): ...
+10 -10
View File
@@ -49,7 +49,7 @@ class ImmutableListMixin(Generic[_V]):
def reverse(self) -> NoReturn: ...
def sort(self, cmp: Any | None = ..., key: Any | None = ..., reverse: Any | None = ...) -> NoReturn: ...
class ImmutableList(ImmutableListMixin[_V], List[_V]): ... # type: ignore
class ImmutableList(ImmutableListMixin[_V], List[_V]): ... # type: ignore[misc]
class ImmutableDictMixin(object):
@classmethod
@@ -92,7 +92,7 @@ class TypeConversionDict(Dict[_K, _V]):
@overload
def get(self, key: _K, default: _D, type: Callable[[_V], _R]) -> _R | _D: ...
class ImmutableTypeConversionDict(ImmutableDictMixin, TypeConversionDict[_K, _V]): # type: ignore
class ImmutableTypeConversionDict(ImmutableDictMixin, TypeConversionDict[_K, _V]): # type: ignore[misc]
def copy(self) -> TypeConversionDict[_K, _V]: ...
def __copy__(self) -> ImmutableTypeConversionDict[_K, _V]: ...
@@ -242,7 +242,7 @@ class EnvironHeaders(ImmutableHeadersMixin, Headers):
def __iter__(self): ...
def copy(self): ...
class CombinedMultiDict(ImmutableMultiDictMixin, MultiDict[_K, _V]): # type: ignore
class CombinedMultiDict(ImmutableMultiDictMixin, MultiDict[_K, _V]): # type: ignore[misc]
def __reduce_ex__(self, protocol): ...
dicts: Any
def __init__(self, dicts: Any | None = ...): ...
@@ -266,15 +266,15 @@ class CombinedMultiDict(ImmutableMultiDictMixin, MultiDict[_K, _V]): # type: ig
class FileMultiDict(MultiDict[_K, _V]):
def add_file(self, name, file, filename: Any | None = ..., content_type: Any | None = ...): ...
class ImmutableDict(ImmutableDictMixin, Dict[_K, _V]): # type: ignore
class ImmutableDict(ImmutableDictMixin, Dict[_K, _V]): # type: ignore[misc]
def copy(self): ...
def __copy__(self): ...
class ImmutableMultiDict(ImmutableMultiDictMixin, MultiDict[_K, _V]): # type: ignore
class ImmutableMultiDict(ImmutableMultiDictMixin, MultiDict[_K, _V]): # type: ignore[misc]
def copy(self): ...
def __copy__(self): ...
class ImmutableOrderedMultiDict(ImmutableMultiDictMixin, OrderedMultiDict[_K, _V]): # type: ignore
class ImmutableOrderedMultiDict(ImmutableMultiDictMixin, OrderedMultiDict[_K, _V]): # type: ignore[misc]
def copy(self): ...
def __copy__(self): ...
@@ -288,8 +288,8 @@ class Accept(ImmutableList[Tuple[str, float]]):
@overload
def __getitem__(self, key: str) -> float: ...
def quality(self, key: str) -> float: ...
def __contains__(self, value: str) -> bool: ... # type: ignore
def index(self, key: str | tuple[str, float]) -> int: ... # type: ignore
def __contains__(self, value: str) -> bool: ... # type: ignore[override]
def index(self, key: str | tuple[str, float]) -> int: ... # type: ignore[override]
def find(self, key: str | tuple[str, float]) -> int: ...
def values(self) -> Iterator[str]: ...
def to_header(self) -> str: ...
@@ -323,7 +323,7 @@ class _CacheControl(UpdateDictMixin, Dict[str, Any]):
def __init__(self, values=..., on_update: Any | None = ...): ...
def to_header(self): ...
class RequestCacheControl(ImmutableDictMixin, _CacheControl): # type: ignore
class RequestCacheControl(ImmutableDictMixin, _CacheControl): # type: ignore[misc]
max_stale: Any
min_fresh: Any
no_transform: Any
@@ -403,7 +403,7 @@ class ContentRange:
def __nonzero__(self): ...
__bool__: Any
class Authorization(ImmutableDictMixin, Dict[str, Any]): # type: ignore
class Authorization(ImmutableDictMixin, Dict[str, Any]): # type: ignore[misc]
type: str
def __init__(self, auth_type: str, data: Mapping[str, Any] | None = ...) -> None: ...
@property
+1 -1
View File
@@ -32,4 +32,4 @@ class Template(FlexTemplate):
keywords: str = ...,
) -> None: ...
def add_page(self) -> None: ...
def render(self, outfile: Any | None = ..., dest: Any | None = ...) -> None: ... # type: ignore
def render(self, outfile: Any | None = ..., dest: Any | None = ...) -> None: ... # type: ignore[override]
+2 -2
View File
@@ -79,8 +79,8 @@ class Credentials:
def iter(self, domain) -> Generator[tuple[str, str], None, None]: ...
class KeyCerts(Credentials):
def add(self, key, cert, domain, password) -> None: ... # type: ignore
def iter(self, domain) -> Generator[tuple[str, str, str], None, None]: ... # type: ignore
def add(self, key, cert, domain, password) -> None: ... # type: ignore[override]
def iter(self, domain) -> Generator[tuple[str, str, str], None, None]: ... # type: ignore[override]
class AllHosts: ...
+1 -1
View File
@@ -11,7 +11,7 @@ class CaseInsensitiveDict(collections.OrderedDict):
def get(self, key, default: Any | None = ...): ...
def pop(self, key, default: Any | None = ...): ...
def setdefault(self, key, default: Any | None = ...): ...
def update(self, other: Any | None = ..., **kw) -> None: ... # type: ignore
def update(self, other: Any | None = ..., **kw) -> None: ... # type: ignore[override]
def __contains__(self, key): ...
def __delitem__(self, key): ...
def __getitem__(self, key): ...
+1 -1
View File
@@ -135,7 +135,7 @@ class JSONWebSignatureSerializer(Serializer):
def load_payload(
self, payload: Text | bytes, serializer: _serializer | None = ..., return_header: bool = ...
) -> Any: ... # morally -> Any | Tuple[Any, MutableMapping[str, Any]]
def dump_payload(self, header: Mapping[str, Any], obj: Any) -> bytes: ... # type: ignore
def dump_payload(self, header: Mapping[str, Any], obj: Any) -> bytes: ... # type: ignore[override]
def make_algorithm(self, algorithm_name: Text) -> SigningAlgorithm: ...
def make_signer(self, salt: Text | bytes | None = ..., algorithm: SigningAlgorithm = ...) -> Signer: ...
def make_header(self, header_fields: Mapping[str, Any] | None) -> MutableMapping[str, Any]: ...
+3 -3
View File
@@ -72,7 +72,7 @@ class _MockIter:
class Base:
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
class NonCallableMock(Base, Any): # type: ignore
class NonCallableMock(Base, Any):
def __new__(__cls, *args: Any, **kw: Any) -> NonCallableMock: ...
def __init__(
self,
@@ -207,7 +207,7 @@ class _patcher:
TEST_PREFIX: str
dict: Type[_patch_dict]
@overload
def __call__( # type: ignore
def __call__( # type: ignore[misc]
self,
target: Any,
*,
@@ -234,7 +234,7 @@ class _patcher:
**kwargs: Any,
) -> _patch[_T]: ...
@overload
def object( # type: ignore
def object( # type: ignore[misc]
self,
target: Any,
attribute: str,
+3 -3
View File
@@ -10,7 +10,7 @@ class _SubDict(MutableMapping[str, PKey]):
def __delitem__(self, key: str) -> None: ...
def __getitem__(self, key: str) -> PKey: ...
def __setitem__(self, key: str, val: PKey) -> None: ...
def keys(self) -> list[str]: ... # type: ignore
def keys(self) -> list[str]: ... # type: ignore[override]
class HostKeys(MutableMapping[str, _SubDict]):
def __init__(self, filename: str | None = ...) -> None: ...
@@ -25,8 +25,8 @@ class HostKeys(MutableMapping[str, _SubDict]):
def __getitem__(self, key: str) -> _SubDict: ...
def __delitem__(self, key: str) -> None: ...
def __setitem__(self, hostname: str, entry: Mapping[str, PKey]) -> None: ...
def keys(self) -> list[str]: ... # type: ignore
def values(self) -> list[_SubDict]: ... # type: ignore
def keys(self) -> list[str]: ... # type: ignore[override]
def values(self) -> list[_SubDict]: ... # type: ignore[override]
@staticmethod
def hash_host(hostname: str, salt: str | None = ...) -> str: ...
+2 -2
View File
@@ -94,12 +94,12 @@ class PortScannerAsync(object):
class PortScannerYield(PortScannerAsync):
def __init__(self) -> None: ...
def scan( # type: ignore
def scan( # type: ignore[override]
self, hosts: str = ..., ports: str | None = ..., arguments: str = ..., sudo: bool = ..., timeout: int = ...
) -> Iterator[tuple[str, _Result]]: ...
def stop(self) -> None: ...
def wait(self, timeout: int | None = ...) -> None: ...
def still_scanning(self) -> None: ... # type: ignore
def still_scanning(self) -> None: ... # type: ignore[override]
class PortScannerHostDict(Dict[str, Any]):
def hostnames(self) -> list[_ResultHostNames]: ...
+1 -1
View File
@@ -11,4 +11,4 @@ class JSON(JSONCommands):
def __init__(self, client, version: Any | None = ..., decoder=..., encoder=...) -> None: ...
def pipeline(self, transaction: bool = ..., shard_hint: Any | None = ...) -> Pipeline: ...
class Pipeline(JSONCommands, ClientPipeline): ... # type: ignore
class Pipeline(JSONCommands, ClientPipeline): ... # type: ignore[misc]
@@ -10,4 +10,4 @@ class TimeSeries(TimeSeriesCommands):
def __init__(self, client: Any | None = ..., **kwargs) -> None: ...
def pipeline(self, transaction: bool = ..., shard_hint: Any | None = ...) -> Pipeline: ...
class Pipeline(TimeSeriesCommands, ClientPipeline): ... # type: ignore
class Pipeline(TimeSeriesCommands, ClientPipeline): ... # type: ignore[misc]
+1 -1
View File
@@ -14,7 +14,7 @@ def from_url(url: str, *, db: int = ..., decode_responses: Literal[True], **kwar
def from_url(url: str, *, db: int = ..., decode_responses: Literal[False] = ..., **kwargs: Any) -> Redis[bytes]: ...
def pipeline(redis_obj: Redis[_StrType]) -> AbstractContextManager[Pipeline[_StrType]]: ...
@overload
def str_if_bytes(value: bytes) -> str: ... # type: ignore
def str_if_bytes(value: bytes) -> str: ... # type: ignore[misc]
@overload
def str_if_bytes(value: _T) -> _T: ...
def safe_str(value: object) -> str: ...
+1 -1
View File
@@ -15,6 +15,6 @@ class CaseInsensitiveDict(MutableMapping[str, _VT], Generic[_VT]):
class LookupDict(Dict[str, _VT]):
name: Any
def __init__(self, name: Any = ...) -> None: ...
def __getitem__(self, key: str) -> _VT | None: ... # type: ignore
def __getitem__(self, key: str) -> _VT | None: ... # type: ignore[override]
def __getattr__(self, attr: str) -> _VT: ...
def __setattr__(self, attr: str, value: _VT) -> None: ...
@@ -13,5 +13,5 @@ class PointerInput(InputDevice):
def create_pointer_down(self, button) -> None: ...
def create_pointer_up(self, button) -> None: ...
def create_pointer_cancel(self) -> None: ...
def create_pause(self, pause_duration) -> None: ... # type: ignore
def create_pause(self, pause_duration) -> None: ... # type: ignore[override]
def encode(self): ...
@@ -9,7 +9,7 @@ class develop(namespaces.DevelopInstaller, easy_install):
boolean_options: Any
command_consumes_arguments: bool
multi_version: bool
def run(self) -> None: ... # type: ignore
def run(self) -> None: ... # type: ignore[override]
uninstall: Any
egg_path: Any
setup_path: Any
+1 -1
View File
@@ -9,7 +9,7 @@ _T = TypeVar("_T")
class ScanningLoader(TestLoader):
def __init__(self) -> None: ...
def loadTestsFromModule(self, module: ModuleType, pattern: Any | None = ...) -> list[TestSuite]: ... # type: ignore
def loadTestsFromModule(self, module: ModuleType, pattern: Any | None = ...) -> list[TestSuite]: ... # type: ignore[override]
class NonDataProperty(Generic[_T]):
fget: Callable[..., _T]
@@ -15,4 +15,4 @@ class upload_docs(upload):
def finalize_options(self) -> None: ...
def create_zipfile(self, filename) -> None: ...
def run(self) -> None: ...
def upload_file(self, filename) -> None: ... # type: ignore
def upload_file(self, filename) -> None: ... # type: ignore[override]
+1 -1
View File
@@ -2,7 +2,7 @@ from distutils.util import Mixin2to3 as _Mixin2to3
from lib2to3.refactor import RefactoringTool
class DistutilsRefactoringTool(RefactoringTool):
def log_error(self, msg, *args, **kw) -> None: ... # type: ignore
def log_error(self, msg, *args, **kw) -> None: ... # type: ignore[override]
def log_message(self, msg, *args) -> None: ...
def log_debug(self, msg, *args) -> None: ...
+2 -2
View File
@@ -8,5 +8,5 @@ class ThemedStyle(ttk.Style, ThemedWidget):
self, master: tkinter.Misc | None = ..., *, theme: str | None = ..., gif_override: bool | None = ..., **kwargs
) -> None: ...
# theme_use() can't return None (differs from ttk.Style)
def theme_use(self, theme_name: str | None = ...) -> str: ... # type: ignore
def theme_names(self) -> list[str]: ... # type: ignore
def theme_use(self, theme_name: str | None = ...) -> str: ... # type: ignore[override]
def theme_names(self) -> list[str]: ... # type: ignore[override]
+2 -2
View File
@@ -23,8 +23,8 @@ class ThemedTk(tkinter.Tk, ThemedWidget):
) -> None: ...
def set_theme(self, theme_name, toplevel: bool | None = ..., themebg: bool | None = ...) -> None: ...
# TODO: currently no good way to say "use the same big list of kwargs as parent class but also add these"
def config(self, kw: Any | None = ..., **kwargs): ... # type: ignore
def config(self, kw: Any | None = ..., **kwargs): ... # type: ignore[override]
def cget(self, k): ...
def configure(self, kw: Any | None = ..., **kwargs): ... # type: ignore
def configure(self, kw: Any | None = ..., **kwargs): ... # type: ignore[override]
def __getitem__(self, k): ...
def __setitem__(self, k, v): ...
+1 -1
View File
@@ -36,7 +36,7 @@ class TimezoneComponent(Component):
normal_attributes: Any
@staticmethod
def pickTzid(tzinfo, allowUTC: bool = ...): ...
def prettyPrint(self, level, tabwidth) -> None: ... # type: ignore
def prettyPrint(self, level, tabwidth) -> None: ... # type: ignore[override]
class RecurringComponent(Component):
isNative: bool
+1 -1
View File
@@ -78,7 +78,7 @@ class Photo(VCardTextBehavior):
@classmethod
def valueRepr(cls, line): ...
@classmethod
def serialize(cls, obj, buf, lineLength, validate) -> None: ... # type: ignore
def serialize(cls, obj, buf, lineLength, validate) -> None: ... # type: ignore[override]
def toListOrString(string): ...
def splitFields(string): ...
+1 -1
View File
@@ -71,7 +71,7 @@ class dispatcher_with_send(dispatcher):
def initiate_send(self) -> None: ...
handle_write: Callable[[], None] = ...
def writable(self) -> bool: ...
def send(self, data: bytes) -> None: ... # type: ignore
def send(self, data: bytes) -> None: ... # type: ignore[override]
def close_all(map: Mapping[int, socket] | None = ..., ignore_all: bool = ...) -> None: ...