mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Drop flake8-noqa and remove workarounds to work with Ruff (#13571)
This commit is contained in:
+5
-2
@@ -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,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()
|
||||
|
||||
Reference in New Issue
Block a user