mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 11:32:07 +08:00
Remove unneeded # noqa comments, fix broken # noqa comments (#7561)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user