Remove unused type: ignore comments (#9801)

This commit is contained in:
Alex Waygood
2023-02-23 20:59:50 +00:00
committed by GitHub
parent 06755e10ba
commit 6ba28ae547
20 changed files with 39 additions and 40 deletions

View File

@@ -447,7 +447,7 @@ class str(Sequence[str]):
@overload
def format(self: LiteralString, *args: LiteralString, **kwargs: LiteralString) -> LiteralString: ...
@overload
def format(self, *args: object, **kwargs: object) -> str: ... # type: ignore[misc]
def format(self, *args: object, **kwargs: object) -> str: ...
def format_map(self, map: _FormatMapMapping) -> str: ...
def index(self, __sub: str, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...) -> int: ...
def isalnum(self) -> bool: ...
@@ -577,7 +577,7 @@ class str(Sequence[str]):
@overload
def __mod__(self: LiteralString, __x: LiteralString | tuple[LiteralString, ...]) -> LiteralString: ...
@overload
def __mod__(self, __x: Any) -> str: ... # type: ignore[misc]
def __mod__(self, __x: Any) -> str: ...
@overload
def __mul__(self: LiteralString, __n: SupportsIndex) -> LiteralString: ...
@overload
@@ -1192,7 +1192,7 @@ class property:
def __delete__(self, __instance: Any) -> None: ...
@final
class _NotImplementedType(Any): # type: ignore[misc]
class _NotImplementedType(Any):
# A little weird, but typing the __call__ as NotImplemented makes the error message
# for NotImplemented() much better
__call__: NotImplemented # type: ignore[valid-type] # pyright: ignore[reportGeneralTypeIssues]
@@ -1613,11 +1613,11 @@ if sys.version_info >= (3, 8):
@overload
def pow(base: int, exp: int, mod: int) -> int: ...
@overload
def pow(base: int, exp: Literal[0], mod: None = None) -> Literal[1]: ... # type: ignore[misc]
def pow(base: int, exp: Literal[0], mod: None = None) -> Literal[1]: ...
@overload
def pow(base: int, exp: _PositiveInteger, mod: None = None) -> int: ... # type: ignore[misc]
def pow(base: int, exp: _PositiveInteger, mod: None = None) -> int: ...
@overload
def pow(base: int, exp: _NegativeInteger, mod: None = None) -> float: ... # type: ignore[misc]
def pow(base: int, exp: _NegativeInteger, mod: None = None) -> float: ...
# int base & positive-int exp -> int; int base & negative-int exp -> float
# return type must be Any as `int | float` causes too many false-positive errors
@overload
@@ -1650,11 +1650,11 @@ else:
@overload
def pow(__base: int, __exp: int, __mod: int) -> int: ...
@overload
def pow(__base: int, __exp: Literal[0], __mod: None = None) -> Literal[1]: ... # type: ignore[misc]
def pow(__base: int, __exp: Literal[0], __mod: None = None) -> Literal[1]: ...
@overload
def pow(__base: int, __exp: _PositiveInteger, __mod: None = None) -> int: ... # type: ignore[misc]
def pow(__base: int, __exp: _PositiveInteger, __mod: None = None) -> int: ...
@overload
def pow(__base: int, __exp: _NegativeInteger, __mod: None = None) -> float: ... # type: ignore[misc]
def pow(__base: int, __exp: _NegativeInteger, __mod: None = None) -> float: ...
@overload
def pow(__base: int, __exp: int, __mod: None = None) -> Any: ...
@overload