Skip to content

Commit 517d2b6

Browse files
srittauJelleZijlstra
authored andcommitted
Remove unneeded ignores (#2624)
1 parent 8c8dc56 commit 517d2b6

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

stdlib/2/UserString.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ class UserString(Sequence[UserString]):
1414
def __hash__(self) -> int: ...
1515
def __len__(self) -> int: ...
1616
@overload
17-
def __getitem__(self: _UST, i: int) -> _UST: ... # type: ignore
17+
def __getitem__(self: _UST, i: int) -> _UST: ...
1818
@overload
19-
def __getitem__(self: _UST, s: slice) -> _UST: ... # type: ignore
19+
def __getitem__(self: _UST, s: slice) -> _UST: ...
2020
def __add__(self: _UST, other: Any) -> _UST: ...
2121
def __radd__(self: _UST, other: Any) -> _UST: ...
2222
def __mul__(self: _UST, other: int) -> _UST: ...

stdlib/2/_io.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class _RawIOBase(_IOBase):
100100
def readall(self) -> str: ...
101101
def read(self, n: int = ...) -> str: ...
102102

103-
class FileIO(_RawIOBase, BytesIO): # type: ignore # for __enter__
103+
class FileIO(_RawIOBase, BytesIO):
104104
mode = ... # type: str
105105
closefd = ... # type: bool
106106
def __init__(self, file: Union[str, int], mode: str = ..., closefd: bool = ...) -> None: ...

stdlib/2/os/path.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@ if sys.version_info < (3, 0):
137137
elif sys.version_info >= (3, 6):
138138
# Mypy complains that the signatures overlap (same for relpath below), but things seem to behave correctly anyway.
139139
@overload
140-
def join(path: _StrPath, *paths: _StrPath) -> Text: ... # type: ignore
140+
def join(path: _StrPath, *paths: _StrPath) -> Text: ...
141141
@overload
142142
def join(path: _BytesPath, *paths: _BytesPath) -> bytes: ...
143143
else:
144144
def join(path: AnyStr, *paths: AnyStr) -> AnyStr: ...
145145

146146
@overload
147-
def relpath(path: _BytesPath, start: Optional[_BytesPath] = ...) -> bytes: ... # type: ignore
147+
def relpath(path: _BytesPath, start: Optional[_BytesPath] = ...) -> bytes: ...
148148
@overload
149149
def relpath(path: _StrPath, start: Optional[_StrPath] = ...) -> Text: ...
150150

stdlib/2/user.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
# Source: https://hg.python.org/cpython/file/2.7/Lib/user.py
55
from typing import Any
66

7-
def __getattr__(name) -> Any: ... # type: ignore
7+
def __getattr__(name) -> Any: ...
88
home: str
99
pythonrc: str

stdlib/2and3/datetime.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,9 @@ class datetime(date):
281281
def __gt__(self, other: datetime) -> bool: ... # type: ignore
282282
def __add__(self, other: timedelta) -> datetime: ...
283283
@overload # type: ignore
284-
def __sub__(self, other: datetime) -> timedelta: ... # type: ignore
285-
@overload # type: ignore
286-
def __sub__(self, other: timedelta) -> datetime: ... # type: ignore
284+
def __sub__(self, other: datetime) -> timedelta: ...
285+
@overload
286+
def __sub__(self, other: timedelta) -> datetime: ...
287287
def __hash__(self) -> int: ...
288288
def weekday(self) -> int: ...
289289
def isoweekday(self) -> int: ...

stdlib/3/importlib/machinery.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class BuiltinImporter(importlib.abc.MetaPathFinder,
3232
def get_source(cls, fullname: str) -> None: ...
3333
# Loader
3434
@staticmethod
35-
def module_repr(module: types.ModuleType) -> str: ... # type: ignore
35+
def module_repr(module: types.ModuleType) -> str: ...
3636
@classmethod
3737
def create_module(cls, spec: ModuleSpec) -> Optional[types.ModuleType]: ...
3838
@classmethod
@@ -62,12 +62,12 @@ class FrozenImporter(importlib.abc.MetaPathFinder, importlib.abc.InspectLoader):
6262
def get_source(cls, fullname: str) -> None: ...
6363
# Loader
6464
@staticmethod
65-
def module_repr(module: types.ModuleType) -> str: ... # type: ignore
65+
def module_repr(module: types.ModuleType) -> str: ...
6666
@classmethod
6767
def create_module(cls, spec: ModuleSpec) -> Optional[types.ModuleType]:
6868
...
6969
@staticmethod
70-
def exec_module(module: types.ModuleType) -> None: ... # type: ignore
70+
def exec_module(module: types.ModuleType) -> None: ...
7171

7272
class WindowsRegistryFinder(importlib.abc.MetaPathFinder):
7373
@classmethod
@@ -113,4 +113,4 @@ class SourcelessFileLoader(importlib.abc.FileLoader,
113113

114114
class ExtensionFileLoader(importlib.abc.ExecutionLoader):
115115
def get_filename(self, fullname: str) -> importlib.abc._Path: ...
116-
def get_source(self, fullname: str) -> None: ... # type: ignore
116+
def get_source(self, fullname: str) -> None: ...

stdlib/3/os/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ if sys.version_info >= (3, 0):
604604
def popen(command: str, mode: str = ..., buffering: int = ...) -> _wrap_close: ...
605605
else:
606606
class _wrap_close(IO[Text]):
607-
def close(self) -> Optional[int]: ... # type: ignore
607+
def close(self) -> Optional[int]: ...
608608
def popen(__cmd: Text, __mode: Text = ..., __bufsize: int = ...) -> _wrap_close: ...
609609
def popen2(__cmd: Text, __mode: Text = ..., __bufsize: int = ...) -> Tuple[IO[Text], IO[Text]]: ...
610610
def popen3(__cmd: Text, __mode: Text = ..., __bufsize: int = ...) -> Tuple[IO[Text], IO[Text], IO[Text]]: ...

stdlib/3/os/path.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@ if sys.version_info < (3, 0):
137137
elif sys.version_info >= (3, 6):
138138
# Mypy complains that the signatures overlap (same for relpath below), but things seem to behave correctly anyway.
139139
@overload
140-
def join(path: _StrPath, *paths: _StrPath) -> Text: ... # type: ignore
140+
def join(path: _StrPath, *paths: _StrPath) -> Text: ...
141141
@overload
142142
def join(path: _BytesPath, *paths: _BytesPath) -> bytes: ...
143143
else:
144144
def join(path: AnyStr, *paths: AnyStr) -> AnyStr: ...
145145

146146
@overload
147-
def relpath(path: _BytesPath, start: Optional[_BytesPath] = ...) -> bytes: ... # type: ignore
147+
def relpath(path: _BytesPath, start: Optional[_BytesPath] = ...) -> bytes: ...
148148
@overload
149149
def relpath(path: _StrPath, start: Optional[_StrPath] = ...) -> Text: ...
150150

0 commit comments

Comments
 (0)