mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-19 09:32:49 +08:00
Fix type of imp.find_module() (#3465)
find_module is documented to return a tuple (file, pathname,
description) where "file" is open file object and "description" a tuple
(suffix, mode, type). The type of "file" was wrong ("str" instead of
"IO[Any]") as well as that of "suffix" ("IO[Any]" instead of "str");
probably those type definitions were swapped.
Fixes #3466.
This commit is contained in:
committed by
Jukka Lehtosalo
parent
34d68ab0a2
commit
838e02334e
@@ -15,7 +15,7 @@ PY_SOURCE: int
|
||||
SEARCH_ERROR: int
|
||||
|
||||
def acquire_lock() -> None: ...
|
||||
def find_module(name: str, path: Iterable[str] = ...) -> Optional[Tuple[str, str, Tuple[str, str, int]]]: ...
|
||||
def find_module(name: str, path: Iterable[str] = ...) -> Optional[Tuple[IO[Any], str, Tuple[str, str, int]]]: ...
|
||||
def get_magic() -> str: ...
|
||||
def get_suffixes() -> List[Tuple[str, str, int]]: ...
|
||||
def init_builtin(name: str) -> types.ModuleType: ...
|
||||
|
||||
Reference in New Issue
Block a user