mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 22:56:55 +08:00
remove unused type ignore flags (#1346)
Verified that none of those are necessary for pytype.
This commit is contained in:
committed by
Guido van Rossum
parent
c31dcf4088
commit
4f2dd0f446
@@ -5,7 +5,7 @@ _T = TypeVar('_T', bound=Enum)
|
||||
_S = TypeVar('_S', bound=Type[Enum])
|
||||
|
||||
class EnumMeta(type, Iterable[Enum], Sized, Reversible[Enum], Container[Enum]):
|
||||
def __iter__(self: Type[_T]) -> Iterator[_T]: ... # type: ignore
|
||||
def __iter__(self: Type[_T]) -> Iterator[_T]: ...
|
||||
def __reversed__(self: Type[_T]) -> Iterator[_T]: ...
|
||||
def __contains__(self, member: Any) -> bool: ...
|
||||
def __getitem__(self: Type[_T], name: str) -> _T: ...
|
||||
@@ -45,11 +45,12 @@ if sys.version_info >= (3, 6):
|
||||
def __xor__(self: _T, other: _T) -> _T: ...
|
||||
def __invert__(self: _T) -> _T: ...
|
||||
|
||||
# All `type: ignore` comments below due to IntFlag making the function signatures more permissive.
|
||||
# The `type: ignore` comment is needed because mypy considers the type
|
||||
# signatures of several methods defined in int and Flag to be incompatible.
|
||||
class IntFlag(int, Flag): # type: ignore
|
||||
def __or__(self: _T, other: Union[int, _T]) -> _T: ... # type: ignore
|
||||
def __and__(self: _T, other: Union[int, _T]) -> _T: ... # type: ignore
|
||||
def __xor__(self: _T, other: Union[int, _T]) -> _T: ... # type: ignore
|
||||
def __or__(self: _T, other: Union[int, _T]) -> _T: ...
|
||||
def __and__(self: _T, other: Union[int, _T]) -> _T: ...
|
||||
def __xor__(self: _T, other: Union[int, _T]) -> _T: ...
|
||||
__ror__ = __or__
|
||||
__rand__ = __and__
|
||||
__rxor__ = __xor__
|
||||
|
||||
Reference in New Issue
Block a user