mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 08:04:24 +08:00
Remove unneeded ignores (#2624)
This commit is contained in:
committed by
Jelle Zijlstra
parent
8c8dc5658f
commit
517d2b6012
@@ -14,9 +14,9 @@ class UserString(Sequence[UserString]):
|
||||
def __hash__(self) -> int: ...
|
||||
def __len__(self) -> int: ...
|
||||
@overload
|
||||
def __getitem__(self: _UST, i: int) -> _UST: ... # type: ignore
|
||||
def __getitem__(self: _UST, i: int) -> _UST: ...
|
||||
@overload
|
||||
def __getitem__(self: _UST, s: slice) -> _UST: ... # type: ignore
|
||||
def __getitem__(self: _UST, s: slice) -> _UST: ...
|
||||
def __add__(self: _UST, other: Any) -> _UST: ...
|
||||
def __radd__(self: _UST, other: Any) -> _UST: ...
|
||||
def __mul__(self: _UST, other: int) -> _UST: ...
|
||||
|
||||
@@ -100,7 +100,7 @@ class _RawIOBase(_IOBase):
|
||||
def readall(self) -> str: ...
|
||||
def read(self, n: int = ...) -> str: ...
|
||||
|
||||
class FileIO(_RawIOBase, BytesIO): # type: ignore # for __enter__
|
||||
class FileIO(_RawIOBase, BytesIO):
|
||||
mode = ... # type: str
|
||||
closefd = ... # type: bool
|
||||
def __init__(self, file: Union[str, int], mode: str = ..., closefd: bool = ...) -> None: ...
|
||||
|
||||
@@ -137,14 +137,14 @@ if sys.version_info < (3, 0):
|
||||
elif sys.version_info >= (3, 6):
|
||||
# Mypy complains that the signatures overlap (same for relpath below), but things seem to behave correctly anyway.
|
||||
@overload
|
||||
def join(path: _StrPath, *paths: _StrPath) -> Text: ... # type: ignore
|
||||
def join(path: _StrPath, *paths: _StrPath) -> Text: ...
|
||||
@overload
|
||||
def join(path: _BytesPath, *paths: _BytesPath) -> bytes: ...
|
||||
else:
|
||||
def join(path: AnyStr, *paths: AnyStr) -> AnyStr: ...
|
||||
|
||||
@overload
|
||||
def relpath(path: _BytesPath, start: Optional[_BytesPath] = ...) -> bytes: ... # type: ignore
|
||||
def relpath(path: _BytesPath, start: Optional[_BytesPath] = ...) -> bytes: ...
|
||||
@overload
|
||||
def relpath(path: _StrPath, start: Optional[_StrPath] = ...) -> Text: ...
|
||||
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
# Source: https://hg.python.org/cpython/file/2.7/Lib/user.py
|
||||
from typing import Any
|
||||
|
||||
def __getattr__(name) -> Any: ... # type: ignore
|
||||
def __getattr__(name) -> Any: ...
|
||||
home: str
|
||||
pythonrc: str
|
||||
|
||||
Reference in New Issue
Block a user