diff --git a/stdlib/argparse.pyi b/stdlib/argparse.pyi index a611af75c37d..88767316f22a 100644 --- a/stdlib/argparse.pyi +++ b/stdlib/argparse.pyi @@ -322,7 +322,7 @@ if sys.version_info >= (3, 9): class Namespace(_AttributeHolder): def __init__(self, **kwargs: Any) -> None: ... def __getattr__(self, name: str) -> Any: ... - def __setattr__(self, name: str, value: Any) -> None: ... + def __setattr__(self, __name: str, __value: Any) -> None: ... def __contains__(self, key: str) -> bool: ... class FileType: diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index 470dc20b7039..954e451ce583 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -340,7 +340,7 @@ class complex: def __add__(self, __x: complex) -> complex: ... def __sub__(self, __x: complex) -> complex: ... def __mul__(self, __x: complex) -> complex: ... - def __pow__(self, __x: complex, mod: None = ...) -> complex: ... + def __pow__(self, __x: complex, __mod: None = ...) -> complex: ... def __truediv__(self, __x: complex) -> complex: ... def __radd__(self, __x: complex) -> complex: ... def __rsub__(self, __x: complex) -> complex: ... @@ -444,7 +444,7 @@ class str(Sequence[str]): def __mod__(self, __x: Any) -> str: ... def __mul__(self, __n: SupportsIndex) -> str: ... def __ne__(self, __x: object) -> bool: ... - def __rmul__(self, n: SupportsIndex) -> str: ... + def __rmul__(self, __n: SupportsIndex) -> str: ... def __getnewargs__(self) -> tuple[str]: ... class bytes(ByteString): @@ -642,7 +642,7 @@ class bytearray(MutableSequence[int], ByteString): @overload def __getitem__(self, __s: slice) -> bytearray: ... @overload - def __setitem__(self, __i: SupportsIndex, x: SupportsIndex) -> None: ... + def __setitem__(self, __i: SupportsIndex, __x: SupportsIndex) -> None: ... @overload def __setitem__(self, __s: slice, __x: Iterable[SupportsIndex] | bytes) -> None: ... def __delitem__(self, __i: SupportsIndex | slice) -> None: ... @@ -889,7 +889,7 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]): def pop(self, __key: _KT, __default: _VT | _T = ...) -> _VT | _T: ... def __len__(self) -> int: ... def __getitem__(self, __k: _KT) -> _VT: ... - def __setitem__(self, __k: _KT, v: _VT) -> None: ... + def __setitem__(self, __k: _KT, __v: _VT) -> None: ... def __delitem__(self, __v: _KT) -> None: ... def __iter__(self) -> Iterator[_KT]: ... if sys.version_info >= (3, 8): diff --git a/stdlib/concurrent/futures/_base.pyi b/stdlib/concurrent/futures/_base.pyi index be8e61177f9d..7edcef223e91 100644 --- a/stdlib/concurrent/futures/_base.pyi +++ b/stdlib/concurrent/futures/_base.pyi @@ -84,9 +84,9 @@ class DoneAndNotDoneFutures(Sequence[set[Future[_T]]]): def __new__(_cls, done: set[Future[_T]], not_done: set[Future[_T]]) -> DoneAndNotDoneFutures[_T]: ... def __len__(self) -> int: ... @overload - def __getitem__(self, i: SupportsIndex) -> set[Future[_T]]: ... + def __getitem__(self, __i: SupportsIndex) -> set[Future[_T]]: ... @overload - def __getitem__(self, s: slice) -> DoneAndNotDoneFutures[_T]: ... + def __getitem__(self, __s: slice) -> DoneAndNotDoneFutures[_T]: ... def wait(fs: Iterable[Future[_T]], timeout: float | None = ..., return_when: str = ...) -> DoneAndNotDoneFutures[_T]: ... diff --git a/stdlib/contextvars.pyi b/stdlib/contextvars.pyi index d1c8ee08b1ad..d85285127160 100644 --- a/stdlib/contextvars.pyi +++ b/stdlib/contextvars.pyi @@ -46,6 +46,6 @@ class Context(Mapping[ContextVar[Any], Any]): def get(self, __key: ContextVar[_T], __default: _D) -> _T | _D: ... def run(self, callable: Callable[_P, _T], *args: _P.args, **kwargs: _P.kwargs) -> _T: ... def copy(self) -> Context: ... - def __getitem__(self, key: ContextVar[_T]) -> _T: ... + def __getitem__(self, __key: ContextVar[_T]) -> _T: ... def __iter__(self) -> Iterator[ContextVar[Any]]: ... def __len__(self) -> int: ... diff --git a/stdlib/email/charset.pyi b/stdlib/email/charset.pyi index d7396e4f2e74..6677cadbd6a6 100644 --- a/stdlib/email/charset.pyi +++ b/stdlib/email/charset.pyi @@ -18,7 +18,7 @@ class Charset: def header_encode_lines(self, string: str, maxlengths: Iterator[int]) -> list[str]: ... def body_encode(self, string: str) -> str: ... def __eq__(self, other: object) -> bool: ... - def __ne__(self, other: object) -> bool: ... + def __ne__(self, __other: object) -> bool: ... def add_charset( charset: str, header_enc: int | None = ..., body_enc: int | None = ..., output_charset: str | None = ... diff --git a/stdlib/email/header.pyi b/stdlib/email/header.pyi index 0fd4bd3d50b2..427bbe285959 100644 --- a/stdlib/email/header.pyi +++ b/stdlib/email/header.pyi @@ -13,7 +13,7 @@ class Header: def append(self, s: bytes | str, charset: Charset | str | None = ..., errors: str = ...) -> None: ... def encode(self, splitchars: str = ..., maxlinelen: int | None = ..., linesep: str = ...) -> str: ... def __eq__(self, other: object) -> bool: ... - def __ne__(self, other: object) -> bool: ... + def __ne__(self, __other: object) -> bool: ... def decode_header(header: Header | str) -> list[tuple[bytes, str | None]]: ... def make_header( diff --git a/stdlib/ipaddress.pyi b/stdlib/ipaddress.pyi index 828dd3669cbd..373d7cffe6a9 100644 --- a/stdlib/ipaddress.pyi +++ b/stdlib/ipaddress.pyi @@ -18,12 +18,12 @@ def ip_network(address: _RawIPAddress | _RawNetworkPart, strict: bool = ...) -> def ip_interface(address: _RawIPAddress | _RawNetworkPart) -> IPv4Interface | IPv6Interface: ... class _IPAddressBase: - def __eq__(self, other: object) -> bool: ... - def __ge__(self: Self, other: Self) -> bool: ... - def __gt__(self: Self, other: Self) -> bool: ... - def __le__(self: Self, other: Self) -> bool: ... - def __lt__(self: Self, other: Self) -> bool: ... - def __ne__(self, other: object) -> bool: ... + def __eq__(self, __other: object) -> bool: ... + def __ge__(self: Self, __other: Self) -> bool: ... + def __gt__(self: Self, __other: Self) -> bool: ... + def __le__(self: Self, __other: Self) -> bool: ... + def __lt__(self: Self, __other: Self) -> bool: ... + def __ne__(self, __other: object) -> bool: ... @property def compressed(self) -> str: ... @property diff --git a/stdlib/mmap.pyi b/stdlib/mmap.pyi index 1f44651dda00..5dd266e84607 100644 --- a/stdlib/mmap.pyi +++ b/stdlib/mmap.pyi @@ -59,14 +59,14 @@ class mmap(AbstractContextManager[mmap], Iterable[int], Sized): def read(self, n: int | None = ...) -> bytes: ... def write(self, bytes: ReadableBuffer) -> int: ... @overload - def __getitem__(self, index: int) -> int: ... + def __getitem__(self, __index: int) -> int: ... @overload - def __getitem__(self, index: slice) -> bytes: ... - def __delitem__(self, index: int | slice) -> NoReturn: ... + def __getitem__(self, __index: slice) -> bytes: ... + def __delitem__(self, __index: int | slice) -> NoReturn: ... @overload - def __setitem__(self, index: int, object: int) -> None: ... + def __setitem__(self, __index: int, __object: int) -> None: ... @overload - def __setitem__(self, index: slice, object: ReadableBuffer) -> None: ... + def __setitem__(self, __index: slice, __object: ReadableBuffer) -> None: ... # Doesn't actually exist, but the object is actually iterable because it has __getitem__ and # __len__, so we claim that there is also an __iter__ to help type checkers. def __iter__(self) -> Iterator[int]: ... diff --git a/stdlib/optparse.pyi b/stdlib/optparse.pyi index 4a15abeaabfb..725866757657 100644 --- a/stdlib/optparse.pyi +++ b/stdlib/optparse.pyi @@ -160,7 +160,7 @@ class Values: def read_file(self, filename: str, mode: str = ...) -> None: ... def read_module(self, modname: str, mode: str = ...) -> None: ... def __getattr__(self, name: str) -> Any: ... - def __setattr__(self, name: str, value: Any) -> None: ... + def __setattr__(self, __name: str, __value: Any) -> None: ... class OptionParser(OptionContainer): allow_interspersed_args: bool diff --git a/stdlib/unittest/mock.pyi b/stdlib/unittest/mock.pyi index 1f0a02dfeb43..a3be1b780dde 100644 --- a/stdlib/unittest/mock.pyi +++ b/stdlib/unittest/mock.pyi @@ -91,7 +91,7 @@ class _Call(tuple[Any, ...]): self, value: Any = ..., name: Any | None = ..., parent: Any | None = ..., two: bool = ..., from_kall: bool = ... ) -> None: ... def __eq__(self, other: object) -> bool: ... - def __ne__(self, other: object) -> bool: ... + def __ne__(self, __other: object) -> bool: ... def __call__(self, *args: Any, **kwargs: Any) -> _Call: ... def __getattr__(self, attr: Any) -> Any: ... if sys.version_info >= (3, 8):