Drop flake8-noqa and remove workarounds to work with Ruff (#13571)

This commit is contained in:
Avasam
2025-03-03 09:48:59 -05:00
committed by GitHub
parent 96c3fe712a
commit cc206f760d
9 changed files with 14 additions and 26 deletions
+5 -2
View File
@@ -1,4 +1,3 @@
# ruff: noqa: PYI036 # This is the module declaring BaseException
import _ast
import _sitebuiltins
import _typeshed
@@ -870,7 +869,11 @@ class memoryview(Sequence[_I]):
def __new__(cls, obj: ReadableBuffer) -> Self: ...
def __enter__(self) -> Self: ...
def __exit__(
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None, /
self,
exc_type: type[BaseException] | None, # noqa: PYI036 # This is the module declaring BaseException
exc_val: BaseException | None,
exc_tb: TracebackType | None,
/,
) -> None: ...
@overload
def cast(self, format: Literal["c", "@c"], shape: list[int] | tuple[int, ...] = ...) -> memoryview[bytes]: ...
+1 -2
View File
@@ -1,5 +1,3 @@
# Since this module defines "Self" it is not recognized by Ruff as typing_extensions.Self
# ruff: noqa: PYI034
import abc
import sys
import typing
@@ -251,6 +249,7 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
@overload
def __ror__(self, value: dict[str, Any], /) -> dict[str, object]: ...
# supposedly incompatible definitions of `__ior__` and `__or__`:
# Since this module defines "Self" it is not recognized by Ruff as typing_extensions.Self
def __ior__(self, value: Self, /) -> Self: ... # type: ignore[misc]
OrderedDict = _Alias()