diff --git a/stdlib/@python2/__builtin__.pyi b/stdlib/@python2/__builtin__.pyi index 04192e17a..d936e08b8 100644 --- a/stdlib/@python2/__builtin__.pyi +++ b/stdlib/@python2/__builtin__.pyi @@ -70,8 +70,8 @@ class object: def __setattr__(self, name: str, value: Any) -> None: ... def __eq__(self, o: object) -> bool: ... def __ne__(self, o: object) -> bool: ... - def __str__(self) -> str: ... # noqa Y029 - def __repr__(self) -> str: ... # noqa Y029 + def __str__(self) -> str: ... # noqa: Y029 + def __repr__(self) -> str: ... # noqa: Y029 def __hash__(self) -> int: ... def __format__(self, format_spec: str) -> str: ... def __getattribute__(self, name: str) -> Any: ... @@ -965,7 +965,7 @@ def pow(__base: _SupportsPow2[_E, _T_co], __exp: _E) -> _T_co: ... @overload def pow(__base: _SupportsPow3[_E, _M, _T_co], __exp: _E, __mod: _M) -> _T_co: ... def quit(code: object = ...) -> NoReturn: ... -def range(__x: int, __y: int = ..., __step: int = ...) -> list[int]: ... # noqa: F811 +def range(__x: int, __y: int = ..., __step: int = ...) -> list[int]: ... def raw_input(__prompt: Any = ...) -> str: ... @overload def reduce(__function: Callable[[_T, _S], _T], __iterable: Iterable[_S], __initializer: _T) -> _T: ... diff --git a/stdlib/@python2/_typeshed/__init__.pyi b/stdlib/@python2/_typeshed/__init__.pyi index a3399a8ca..657164f81 100644 --- a/stdlib/@python2/_typeshed/__init__.pyi +++ b/stdlib/@python2/_typeshed/__init__.pyi @@ -28,7 +28,7 @@ _T_contra = TypeVar("_T_contra", contravariant=True) # Use for "self" annotations: # def __enter__(self: Self) -> Self: ... -Self = TypeVar("Self") # noqa Y001 +Self = TypeVar("Self") # noqa: Y001 class IdentityFunction(Protocol): def __call__(self, __x: _T) -> _T: ... diff --git a/stdlib/@python2/builtins.pyi b/stdlib/@python2/builtins.pyi index 04192e17a..d936e08b8 100644 --- a/stdlib/@python2/builtins.pyi +++ b/stdlib/@python2/builtins.pyi @@ -70,8 +70,8 @@ class object: def __setattr__(self, name: str, value: Any) -> None: ... def __eq__(self, o: object) -> bool: ... def __ne__(self, o: object) -> bool: ... - def __str__(self) -> str: ... # noqa Y029 - def __repr__(self) -> str: ... # noqa Y029 + def __str__(self) -> str: ... # noqa: Y029 + def __repr__(self) -> str: ... # noqa: Y029 def __hash__(self) -> int: ... def __format__(self, format_spec: str) -> str: ... def __getattribute__(self, name: str) -> Any: ... @@ -965,7 +965,7 @@ def pow(__base: _SupportsPow2[_E, _T_co], __exp: _E) -> _T_co: ... @overload def pow(__base: _SupportsPow3[_E, _M, _T_co], __exp: _E, __mod: _M) -> _T_co: ... def quit(code: object = ...) -> NoReturn: ... -def range(__x: int, __y: int = ..., __step: int = ...) -> list[int]: ... # noqa: F811 +def range(__x: int, __y: int = ..., __step: int = ...) -> list[int]: ... def raw_input(__prompt: Any = ...) -> str: ... @overload def reduce(__function: Callable[[_T, _S], _T], __iterable: Iterable[_S], __initializer: _T) -> _T: ... diff --git a/stdlib/@python2/distutils/version.pyi b/stdlib/@python2/distutils/version.pyi index b3bb9ea49..0e37a3a1a 100644 --- a/stdlib/@python2/distutils/version.pyi +++ b/stdlib/@python2/distutils/version.pyi @@ -20,7 +20,7 @@ class StrictVersion(Version): prerelease: tuple[Text, int] | None def __init__(self, vstring: Text | None = ...) -> None: ... def parse(self: Self, vstring: Text) -> Self: ... - def __str__(self) -> str: ... # noqa Y029 + def __str__(self) -> str: ... # noqa: Y029 def __cmp__(self: _T, other: _T | str) -> bool: ... class LooseVersion(Version): @@ -29,5 +29,5 @@ class LooseVersion(Version): version: tuple[Text | int, ...] def __init__(self, vstring: Text | None = ...) -> None: ... def parse(self: Self, vstring: Text) -> Self: ... - def __str__(self) -> str: ... # noqa Y029 + def __str__(self) -> str: ... # noqa: Y029 def __cmp__(self: _T, other: _T | str) -> bool: ... diff --git a/stdlib/@python2/typing_extensions.pyi b/stdlib/@python2/typing_extensions.pyi index 1f5123d32..62ef6f7b7 100644 --- a/stdlib/@python2/typing_extensions.pyi +++ b/stdlib/@python2/typing_extensions.pyi @@ -1,6 +1,6 @@ import abc from _typeshed import Self -from typing import ( # noqa Y022 +from typing import ( # noqa: Y022 TYPE_CHECKING as TYPE_CHECKING, Any, Callable, diff --git a/stdlib/_typeshed/__init__.pyi b/stdlib/_typeshed/__init__.pyi index b6c7e0762..f3b47cae0 100644 --- a/stdlib/_typeshed/__init__.pyi +++ b/stdlib/_typeshed/__init__.pyi @@ -21,7 +21,7 @@ _T_contra = TypeVar("_T_contra", contravariant=True) # Use for "self" annotations: # def __enter__(self: Self) -> Self: ... -Self = TypeVar("Self") # noqa Y001 +Self = TypeVar("Self") # noqa: Y001 # For partially known annotations. Usually, fields where type annotations # haven't been added are left unannotated, but in some situations this diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index 1aaa9da0c..99783cd60 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -101,8 +101,8 @@ class object: def __delattr__(self, __name: str) -> None: ... def __eq__(self, __o: object) -> bool: ... def __ne__(self, __o: object) -> bool: ... - def __str__(self) -> str: ... # noqa Y029 - def __repr__(self) -> str: ... # noqa Y029 + def __str__(self) -> str: ... # noqa: Y029 + def __repr__(self) -> str: ... # noqa: Y029 def __hash__(self) -> int: ... def __format__(self, __format_spec: str) -> str: ... def __getattribute__(self, __name: str) -> Any: ... diff --git a/stdlib/contextlib.pyi b/stdlib/contextlib.pyi index 98792d3b4..c1b8b6b64 100644 --- a/stdlib/contextlib.pyi +++ b/stdlib/contextlib.pyi @@ -1,7 +1,7 @@ import sys from _typeshed import Self, StrOrBytesPath from types import TracebackType -from typing import ( # noqa Y027 +from typing import ( # noqa: Y027 IO, Any, AsyncGenerator, @@ -80,7 +80,7 @@ else: AbstractContextManager = ContextManager if sys.version_info >= (3, 7): - from typing import AsyncContextManager # noqa Y022 + from typing import AsyncContextManager # noqa: Y022 AbstractAsyncContextManager = AsyncContextManager diff --git a/stdlib/distutils/version.pyi b/stdlib/distutils/version.pyi index 210aa5cf7..8745e8c9f 100644 --- a/stdlib/distutils/version.pyi +++ b/stdlib/distutils/version.pyi @@ -23,7 +23,7 @@ class StrictVersion(Version): prerelease: tuple[str, int] | None def __init__(self, vstring: str | None = ...) -> None: ... def parse(self: Self, vstring: str) -> Self: ... - def __str__(self) -> str: ... # noqa Y029 + def __str__(self) -> str: ... # noqa: Y029 def _cmp(self: Self, other: Self | str) -> bool: ... class LooseVersion(Version): @@ -32,5 +32,5 @@ class LooseVersion(Version): version: tuple[str | int, ...] def __init__(self, vstring: str | None = ...) -> None: ... def parse(self: Self, vstring: str) -> Self: ... - def __str__(self) -> str: ... # noqa Y029 + def __str__(self) -> str: ... # noqa: Y029 def _cmp(self: Self, other: Self | str) -> bool: ... diff --git a/stdlib/types.pyi b/stdlib/types.pyi index a1873f30c..be11c8827 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -659,10 +659,10 @@ if sys.version_info >= (3, 10): @final class NoneType: def __bool__(self) -> Literal[False]: ... - EllipsisType = ellipsis # noqa F811 from builtins + EllipsisType = ellipsis # noqa: F821 from builtins from builtins import _NotImplementedType - NotImplementedType = _NotImplementedType # noqa F811 from builtins + NotImplementedType = _NotImplementedType @final class UnionType: @property diff --git a/stdlib/typing_extensions.pyi b/stdlib/typing_extensions.pyi index 193fa4feb..892218f68 100644 --- a/stdlib/typing_extensions.pyi +++ b/stdlib/typing_extensions.pyi @@ -1,7 +1,7 @@ import abc import sys from _typeshed import Self as TypeshedSelf # see #6932 for why the alias cannot have a leading underscore -from typing import ( # noqa Y022 +from typing import ( # noqa: Y022,Y027 TYPE_CHECKING as TYPE_CHECKING, Any, AsyncContextManager as AsyncContextManager, diff --git a/stubs/SQLAlchemy/sqlalchemy/util/compat.pyi b/stubs/SQLAlchemy/sqlalchemy/util/compat.pyi index 6b05ce390..cd2df046e 100644 --- a/stubs/SQLAlchemy/sqlalchemy/util/compat.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/util/compat.pyi @@ -35,7 +35,7 @@ arm: Any has_refcount_gc: Any contextmanager = contextlib.contextmanager dottedgetter = operator.attrgetter -namedtuple = collections.namedtuple # noqa Y024 +namedtuple = collections.namedtuple # noqa: Y024 next = builtins.next class FullArgSpec(NamedTuple): diff --git a/stubs/aiofiles/aiofiles/os.pyi b/stubs/aiofiles/aiofiles/os.pyi index a625213e4..0ad3ab6c9 100644 --- a/stubs/aiofiles/aiofiles/os.pyi +++ b/stubs/aiofiles/aiofiles/os.pyi @@ -43,7 +43,7 @@ async def mkdir( *, dir_fd: int | None = ..., loop: AbstractEventLoop | None = ..., - executor: Any = ..., # noqa: F811 + executor: Any = ..., ) -> None: ... async def makedirs( name: StrOrBytesPath, mode: int = ..., exist_ok: bool = ..., *, loop: AbstractEventLoop | None = ..., executor: Any = ... diff --git a/stubs/flake8-plugin-utils/flake8_plugin_utils/plugin.pyi b/stubs/flake8-plugin-utils/flake8_plugin_utils/plugin.pyi index 25f910fc3..da825d2fe 100644 --- a/stubs/flake8-plugin-utils/flake8_plugin_utils/plugin.pyi +++ b/stubs/flake8-plugin-utils/flake8_plugin_utils/plugin.pyi @@ -3,7 +3,7 @@ import ast from typing import Any, Generic, Iterable, Iterator, TypeVar FLAKE8_ERROR = tuple[int, int, str, type[Any]] -TConfig = TypeVar("TConfig") # noqa: Y001 +TConfig = TypeVar("TConfig") # noqa: Y001 # Name of the TypeVar matches the name at runtime class Error: code: str diff --git a/stubs/httplib2/httplib2/__init__.pyi b/stubs/httplib2/httplib2/__init__.pyi index f1da1887f..10249a122 100644 --- a/stubs/httplib2/httplib2/__init__.pyi +++ b/stubs/httplib2/httplib2/__init__.pyi @@ -1,12 +1,10 @@ import http.client +from _typeshed import Self from collections.abc import Generator -from typing import Any, TypeVar +from typing import Any from .error import * -# Should use _typeshed.Self when google/pytype#952 is fixed. -Self = TypeVar("Self") # noqa Y001 - __author__: str __copyright__: str __contributors__: list[str]