mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-31 16:44:25 +08:00
Remove unneeded ignores (#2624)
This commit is contained in:
committed by
Jelle Zijlstra
parent
8c8dc5658f
commit
517d2b6012
@@ -32,7 +32,7 @@ class BuiltinImporter(importlib.abc.MetaPathFinder,
|
||||
def get_source(cls, fullname: str) -> None: ...
|
||||
# Loader
|
||||
@staticmethod
|
||||
def module_repr(module: types.ModuleType) -> str: ... # type: ignore
|
||||
def module_repr(module: types.ModuleType) -> str: ...
|
||||
@classmethod
|
||||
def create_module(cls, spec: ModuleSpec) -> Optional[types.ModuleType]: ...
|
||||
@classmethod
|
||||
@@ -62,12 +62,12 @@ class FrozenImporter(importlib.abc.MetaPathFinder, importlib.abc.InspectLoader):
|
||||
def get_source(cls, fullname: str) -> None: ...
|
||||
# Loader
|
||||
@staticmethod
|
||||
def module_repr(module: types.ModuleType) -> str: ... # type: ignore
|
||||
def module_repr(module: types.ModuleType) -> str: ...
|
||||
@classmethod
|
||||
def create_module(cls, spec: ModuleSpec) -> Optional[types.ModuleType]:
|
||||
...
|
||||
@staticmethod
|
||||
def exec_module(module: types.ModuleType) -> None: ... # type: ignore
|
||||
def exec_module(module: types.ModuleType) -> None: ...
|
||||
|
||||
class WindowsRegistryFinder(importlib.abc.MetaPathFinder):
|
||||
@classmethod
|
||||
@@ -113,4 +113,4 @@ class SourcelessFileLoader(importlib.abc.FileLoader,
|
||||
|
||||
class ExtensionFileLoader(importlib.abc.ExecutionLoader):
|
||||
def get_filename(self, fullname: str) -> importlib.abc._Path: ...
|
||||
def get_source(self, fullname: str) -> None: ... # type: ignore
|
||||
def get_source(self, fullname: str) -> None: ...
|
||||
|
||||
@@ -604,7 +604,7 @@ if sys.version_info >= (3, 0):
|
||||
def popen(command: str, mode: str = ..., buffering: int = ...) -> _wrap_close: ...
|
||||
else:
|
||||
class _wrap_close(IO[Text]):
|
||||
def close(self) -> Optional[int]: ... # type: ignore
|
||||
def close(self) -> Optional[int]: ...
|
||||
def popen(__cmd: Text, __mode: Text = ..., __bufsize: int = ...) -> _wrap_close: ...
|
||||
def popen2(__cmd: Text, __mode: Text = ..., __bufsize: int = ...) -> Tuple[IO[Text], IO[Text]]: ...
|
||||
def popen3(__cmd: Text, __mode: Text = ..., __bufsize: int = ...) -> Tuple[IO[Text], IO[Text], IO[Text]]: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user