diff --git a/stdlib/@python2/__builtin__.pyi b/stdlib/@python2/__builtin__.pyi index bb51cfe7883f..04192e17a452 100644 --- a/stdlib/@python2/__builtin__.pyi +++ b/stdlib/@python2/__builtin__.pyi @@ -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 diff --git a/stdlib/@python2/_msi.pyi b/stdlib/@python2/_msi.pyi index 754febe68da9..b7e852f38ae9 100644 --- a/stdlib/@python2/_msi.pyi +++ b/stdlib/@python2/_msi.pyi @@ -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: ... diff --git a/stdlib/@python2/argparse.pyi b/stdlib/@python2/argparse.pyi index 3eacc7b1dc3b..a9a57ea0ea55 100644 --- a/stdlib/@python2/argparse.pyi +++ b/stdlib/@python2/argparse.pyi @@ -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( diff --git a/stdlib/@python2/array.pyi b/stdlib/@python2/array.pyi index fcd1d7bfa4d0..a47b845d1933 100644 --- a/stdlib/@python2/array.pyi +++ b/stdlib/@python2/array.pyi @@ -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: ... diff --git a/stdlib/@python2/builtins.pyi b/stdlib/@python2/builtins.pyi index bb51cfe7883f..04192e17a452 100644 --- a/stdlib/@python2/builtins.pyi +++ b/stdlib/@python2/builtins.pyi @@ -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 diff --git a/stdlib/@python2/bz2.pyi b/stdlib/@python2/bz2.pyi index e182aa428e06..95377347cce8 100644 --- a/stdlib/@python2/bz2.pyi +++ b/stdlib/@python2/bz2.pyi @@ -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: ... diff --git a/stdlib/@python2/codecs.pyi b/stdlib/@python2/codecs.pyi index 0f97a4401556..9ed83567c148 100644 --- a/stdlib/@python2/codecs.pyi +++ b/stdlib/@python2/codecs.pyi @@ -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: ... diff --git a/stdlib/@python2/ctypes/__init__.pyi b/stdlib/@python2/ctypes/__init__.pyi index ef627f10f656..0fc23cb09b5b 100644 --- a/stdlib/@python2/ctypes/__init__.pyi +++ b/stdlib/@python2/ctypes/__init__.pyi @@ -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 = ... diff --git a/stdlib/@python2/datetime.pyi b/stdlib/@python2/datetime.pyi index bdd32a8e7ef7..62791461c885 100644 --- a/stdlib/@python2/datetime.pyi +++ b/stdlib/@python2/datetime.pyi @@ -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: ... diff --git a/stdlib/@python2/dbm/gnu.pyi b/stdlib/@python2/dbm/gnu.pyi index 019711f62ed1..c6eed0be2098 100644 --- a/stdlib/@python2/dbm/gnu.pyi +++ b/stdlib/@python2/dbm/gnu.pyi @@ -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: ... diff --git a/stdlib/@python2/dbm/ndbm.pyi b/stdlib/@python2/dbm/ndbm.pyi index 92ec92ebd0cd..764aed01a357 100644 --- a/stdlib/@python2/dbm/ndbm.pyi +++ b/stdlib/@python2/dbm/ndbm.pyi @@ -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: ... diff --git a/stdlib/@python2/difflib.pyi b/stdlib/@python2/difflib.pyi index 30b624b8fd15..f4214cec2260 100644 --- a/stdlib/@python2/difflib.pyi +++ b/stdlib/@python2/difflib.pyi @@ -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 = ... diff --git a/stdlib/@python2/genericpath.pyi b/stdlib/@python2/genericpath.pyi index 66b9d5fc34a5..7ff27a62f959 100644 --- a/stdlib/@python2/genericpath.pyi +++ b/stdlib/@python2/genericpath.pyi @@ -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 diff --git a/stdlib/@python2/inspect.pyi b/stdlib/@python2/inspect.pyi index aa0450ce6785..06912867cf21 100644 --- a/stdlib/@python2/inspect.pyi +++ b/stdlib/@python2/inspect.pyi @@ -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]] diff --git a/stdlib/@python2/logging/handlers.pyi b/stdlib/@python2/logging/handlers.pyi index 360e76c66558..212980e32ac6 100644 --- a/stdlib/@python2/logging/handlers.pyi +++ b/stdlib/@python2/logging/handlers.pyi @@ -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 diff --git a/stdlib/@python2/smtpd.pyi b/stdlib/@python2/smtpd.pyi index 6778611a56d9..c7741d183415 100644 --- a/stdlib/@python2/smtpd.pyi +++ b/stdlib/@python2/smtpd.pyi @@ -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] diff --git a/stdlib/@python2/turtle.pyi b/stdlib/@python2/turtle.pyi index 7b104bec7812..037b9851381f 100644 --- a/stdlib/@python2/turtle.pyi +++ b/stdlib/@python2/turtle.pyi @@ -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: ... diff --git a/stdlib/@python2/typing_extensions.pyi b/stdlib/@python2/typing_extensions.pyi index 53957910576c..1f5123d32a04 100644 --- a/stdlib/@python2/typing_extensions.pyi +++ b/stdlib/@python2/typing_extensions.pyi @@ -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]: ... diff --git a/stdlib/@python2/weakref.pyi b/stdlib/@python2/weakref.pyi index 8c65ab21a568..959c3e1b9d1e 100644 --- a/stdlib/@python2/weakref.pyi +++ b/stdlib/@python2/weakref.pyi @@ -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]): diff --git a/stdlib/@python2/xml/dom/minicompat.pyi b/stdlib/@python2/xml/dom/minicompat.pyi index 254f8a0c1657..e37b7cd89176 100644 --- a/stdlib/@python2/xml/dom/minicompat.pyi +++ b/stdlib/@python2/xml/dom/minicompat.pyi @@ -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: ... diff --git a/stdlib/@python2/xml/dom/xmlbuilder.pyi b/stdlib/@python2/xml/dom/xmlbuilder.pyi index d8936bdc2ab4..a77c99790fda 100644 --- a/stdlib/@python2/xml/dom/xmlbuilder.pyi +++ b/stdlib/@python2/xml/dom/xmlbuilder.pyi @@ -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): ... diff --git a/stdlib/@python2/xmlrpclib.pyi b/stdlib/@python2/xmlrpclib.pyi index 8d2766e6578a..2365bcf90cd1 100644 --- a/stdlib/@python2/xmlrpclib.pyi +++ b/stdlib/@python2/xmlrpclib.pyi @@ -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: ... diff --git a/stdlib/@python2/zipfile.pyi b/stdlib/@python2/zipfile.pyi index 777692598ab7..63c93b482855 100644 --- a/stdlib/@python2/zipfile.pyi +++ b/stdlib/@python2/zipfile.pyi @@ -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: ... diff --git a/stdlib/http/client.pyi b/stdlib/http/client.pyi index 64452dc70807..801a195c9fb3 100644 --- a/stdlib/http/client.pyi +++ b/stdlib/http/client.pyi @@ -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 diff --git a/stdlib/importlib/machinery.pyi b/stdlib/importlib/machinery.pyi index 7efe287f7205..f15ac48af5c5 100644 --- a/stdlib/importlib/machinery.pyi +++ b/stdlib/importlib/machinery.pyi @@ -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: ... diff --git a/stdlib/io.pyi b/stdlib/io.pyi index f12d6861d517..ef4789251cc3 100644 --- a/stdlib/io.pyi +++ b/stdlib/io.pyi @@ -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], diff --git a/stdlib/unittest/mock.pyi b/stdlib/unittest/mock.pyi index 4f520528cd2e..1f7ac9d5bd8c 100644 --- a/stdlib/unittest/mock.pyi +++ b/stdlib/unittest/mock.pyi @@ -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 diff --git a/stubs/Flask-Cors/flask_cors/core.pyi b/stubs/Flask-Cors/flask_cors/core.pyi index b5d3c05691f3..083a653b14cd 100644 --- a/stubs/Flask-Cors/flask_cors/core.pyi +++ b/stubs/Flask-Cors/flask_cors/core.pyi @@ -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]: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pyodbc.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pyodbc.pyi index 2c870d14cafd..3940f1f665e3 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pyodbc.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pyodbc.pyi @@ -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 diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/context.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/context.pyi index b5fc3cd00396..bc123f007e77 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/context.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/context.pyi @@ -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 diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi index b7c82d82a7df..66b4197d64f2 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi @@ -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 diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/sqltypes.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/sqltypes.pyi index 5075c49b91d9..fc90e0d7fadd 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/sqltypes.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/sqltypes.pyi @@ -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 diff --git a/stubs/babel/babel/support.pyi b/stubs/babel/babel/support.pyi index 09ccd93abaa9..658eb14d7e73 100644 --- a/stubs/babel/babel/support.pyi +++ b/stubs/babel/babel/support.pyi @@ -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: ... diff --git a/stubs/beautifulsoup4/bs4/__init__.pyi b/stubs/beautifulsoup4/bs4/__init__.pyi index 1b66e650fa30..9245aba7327b 100644 --- a/stubs/beautifulsoup4/bs4/__init__.pyi +++ b/stubs/beautifulsoup4/bs4/__init__.pyi @@ -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): ... diff --git a/stubs/beautifulsoup4/bs4/builder/_html5lib.pyi b/stubs/beautifulsoup4/bs4/builder/_html5lib.pyi index 990d45060521..bf2032865d24 100644 --- a/stubs/beautifulsoup4/bs4/builder/_html5lib.pyi +++ b/stubs/beautifulsoup4/bs4/builder/_html5lib.pyi @@ -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 diff --git a/stubs/beautifulsoup4/bs4/builder/_lxml.pyi b/stubs/beautifulsoup4/bs4/builder/_lxml.pyi index 9133e6a17615..b206067cddb5 100644 --- a/stubs/beautifulsoup4/bs4/builder/_lxml.pyi +++ b/stubs/beautifulsoup4/bs4/builder/_lxml.pyi @@ -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 diff --git a/stubs/beautifulsoup4/bs4/element.pyi b/stubs/beautifulsoup4/bs4/element.pyi index 06b8032bb5b9..e55034475098 100644 --- a/stubs/beautifulsoup4/bs4/element.pyi +++ b/stubs/beautifulsoup4/bs4/element.pyi @@ -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. diff --git a/stubs/boto/boto/auth.pyi b/stubs/boto/boto/auth.pyi index 3a588d27ed8e..2dc77949c110 100644 --- a/stubs/boto/boto/auth.pyi +++ b/stubs/boto/boto/auth.pyi @@ -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: ... diff --git a/stubs/boto/boto/connection.pyi b/stubs/boto/boto/connection.pyi index c47f7414fba3..fe2f136de717 100644 --- a/stubs/boto/boto/connection.pyi +++ b/stubs/boto/boto/connection.pyi @@ -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 = ...): ... diff --git a/stubs/boto/boto/s3/connection.pyi b/stubs/boto/boto/s3/connection.pyi index 239688e52e1d..286b1c7fd5ff 100644 --- a/stubs/boto/boto/s3/connection.pyi +++ b/stubs/boto/boto/s3/connection.pyi @@ -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, + ): ... diff --git a/stubs/mock/mock/mock.pyi b/stubs/mock/mock/mock.pyi index 4e740a303c36..4dc2682487e0 100644 --- a/stubs/mock/mock/mock.pyi +++ b/stubs/mock/mock/mock.pyi @@ -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 diff --git a/stubs/openpyxl/openpyxl/chart/bar_chart.pyi b/stubs/openpyxl/openpyxl/chart/bar_chart.pyi index 071d36a48184..d48fc86ef303 100644 --- a/stubs/openpyxl/openpyxl/chart/bar_chart.pyi +++ b/stubs/openpyxl/openpyxl/chart/bar_chart.pyi @@ -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 diff --git a/stubs/openpyxl/openpyxl/chart/surface_chart.pyi b/stubs/openpyxl/openpyxl/chart/surface_chart.pyi index 6b56719342ce..15d52a855170 100644 --- a/stubs/openpyxl/openpyxl/chart/surface_chart.pyi +++ b/stubs/openpyxl/openpyxl/chart/surface_chart.pyi @@ -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 diff --git a/stubs/parsimonious/parsimonious/expressions.pyi b/stubs/parsimonious/parsimonious/expressions.pyi index 577f7e1113e0..9818c6a1b167 100644 --- a/stubs/parsimonious/parsimonious/expressions.pyi +++ b/stubs/parsimonious/parsimonious/expressions.pyi @@ -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, diff --git a/stubs/parsimonious/parsimonious/grammar.pyi b/stubs/parsimonious/parsimonious/grammar.pyi index 78d21b2d6e93..2b6e012669b8 100644 --- a/stubs/parsimonious/parsimonious/grammar.pyi +++ b/stubs/parsimonious/parsimonious/grammar.pyi @@ -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: ... diff --git a/stubs/passlib/passlib/handlers/argon2.pyi b/stubs/passlib/passlib/handlers/argon2.pyi index 49f220312dd5..b947a3901c84 100644 --- a/stubs/passlib/passlib/handlers/argon2.pyi +++ b/stubs/passlib/passlib/handlers/argon2.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/bcrypt.pyi b/stubs/passlib/passlib/handlers/bcrypt.pyi index 34747933cc48..6abdcdf2e0a6 100644 --- a/stubs/passlib/passlib/handlers/bcrypt.pyi +++ b/stubs/passlib/passlib/handlers/bcrypt.pyi @@ -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): diff --git a/stubs/passlib/passlib/handlers/cisco.pyi b/stubs/passlib/passlib/handlers/cisco.pyi index e566bafcc39a..29ad296cda6e 100644 --- a/stubs/passlib/passlib/handlers/cisco.pyi +++ b/stubs/passlib/passlib/handlers/cisco.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/des_crypt.pyi b/stubs/passlib/passlib/handlers/des_crypt.pyi index c7aa16350092..f67a508f9eab 100644 --- a/stubs/passlib/passlib/handlers/des_crypt.pyi +++ b/stubs/passlib/passlib/handlers/des_crypt.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/django.pyi b/stubs/passlib/passlib/handlers/django.pyi index b6e3bfcf3ac4..57cc2b0f4deb 100644 --- a/stubs/passlib/passlib/handlers/django.pyi +++ b/stubs/passlib/passlib/handlers/django.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/fshp.pyi b/stubs/passlib/passlib/handlers/fshp.pyi index e22157f5026f..290445b85cfd 100644 --- a/stubs/passlib/passlib/handlers/fshp.pyi +++ b/stubs/passlib/passlib/handlers/fshp.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/ldap_digests.pyi b/stubs/passlib/passlib/handlers/ldap_digests.pyi index 1a8092bacc71..29ae0fd2d1b2 100644 --- a/stubs/passlib/passlib/handlers/ldap_digests.pyi +++ b/stubs/passlib/passlib/handlers/ldap_digests.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/md5_crypt.pyi b/stubs/passlib/passlib/handlers/md5_crypt.pyi index c8497d147967..19fd10c36935 100644 --- a/stubs/passlib/passlib/handlers/md5_crypt.pyi +++ b/stubs/passlib/passlib/handlers/md5_crypt.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/misc.pyi b/stubs/passlib/passlib/handlers/misc.pyi index adb1b27c080b..d9721c502e5b 100644 --- a/stubs/passlib/passlib/handlers/misc.pyi +++ b/stubs/passlib/passlib/handlers/misc.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/mssql.pyi b/stubs/passlib/passlib/handlers/mssql.pyi index b3c1b8670c59..9f8dd2b32b7a 100644 --- a/stubs/passlib/passlib/handlers/mssql.pyi +++ b/stubs/passlib/passlib/handlers/mssql.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/oracle.pyi b/stubs/passlib/passlib/handlers/oracle.pyi index 00af0b30d60d..96344e1811a8 100644 --- a/stubs/passlib/passlib/handlers/oracle.pyi +++ b/stubs/passlib/passlib/handlers/oracle.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/pbkdf2.pyi b/stubs/passlib/passlib/handlers/pbkdf2.pyi index a42dc0ff6873..b2b9920e0f5d 100644 --- a/stubs/passlib/passlib/handlers/pbkdf2.pyi +++ b/stubs/passlib/passlib/handlers/pbkdf2.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/phpass.pyi b/stubs/passlib/passlib/handlers/phpass.pyi index 0f0327682beb..95120e2ba1af 100644 --- a/stubs/passlib/passlib/handlers/phpass.pyi +++ b/stubs/passlib/passlib/handlers/phpass.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/postgres.pyi b/stubs/passlib/passlib/handlers/postgres.pyi index 2295654088e6..dd9419c29e6c 100644 --- a/stubs/passlib/passlib/handlers/postgres.pyi +++ b/stubs/passlib/passlib/handlers/postgres.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/scram.pyi b/stubs/passlib/passlib/handlers/scram.pyi index fb653b60755e..3720651890c3 100644 --- a/stubs/passlib/passlib/handlers/scram.pyi +++ b/stubs/passlib/passlib/handlers/scram.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/scrypt.pyi b/stubs/passlib/passlib/handlers/scrypt.pyi index 9c7731c2a25a..341dbaeaa4f5 100644 --- a/stubs/passlib/passlib/handlers/scrypt.pyi +++ b/stubs/passlib/passlib/handlers/scrypt.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/sha1_crypt.pyi b/stubs/passlib/passlib/handlers/sha1_crypt.pyi index 159065055601..9167f7551eb9 100644 --- a/stubs/passlib/passlib/handlers/sha1_crypt.pyi +++ b/stubs/passlib/passlib/handlers/sha1_crypt.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/sha2_crypt.pyi b/stubs/passlib/passlib/handlers/sha2_crypt.pyi index 417f0ae9cf1e..9ccae22351ce 100644 --- a/stubs/passlib/passlib/handlers/sha2_crypt.pyi +++ b/stubs/passlib/passlib/handlers/sha2_crypt.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/sun_md5_crypt.pyi b/stubs/passlib/passlib/handlers/sun_md5_crypt.pyi index 5e699bc2037e..82f161b5c133 100644 --- a/stubs/passlib/passlib/handlers/sun_md5_crypt.pyi +++ b/stubs/passlib/passlib/handlers/sun_md5_crypt.pyi @@ -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 diff --git a/stubs/passlib/passlib/handlers/windows.pyi b/stubs/passlib/passlib/handlers/windows.pyi index 5b95bcad396e..9c96b3b0c6a9 100644 --- a/stubs/passlib/passlib/handlers/windows.pyi +++ b/stubs/passlib/passlib/handlers/windows.pyi @@ -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 diff --git a/stubs/passlib/passlib/utils/handlers.pyi b/stubs/passlib/passlib/utils/handlers.pyi index 2af68330ee54..0d7670b0232c 100644 --- a/stubs/passlib/passlib/utils/handlers.pyi +++ b/stubs/passlib/passlib/utils/handlers.pyi @@ -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 diff --git a/stubs/polib/polib.pyi b/stubs/polib/polib.pyi index a9f9f5bebd65..932b8282ad8e 100644 --- a/stubs/polib/polib.pyi +++ b/stubs/polib/polib.pyi @@ -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]: ...