mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 06:36:54 +08:00
@@ -1,5 +1,4 @@
|
||||
import os
|
||||
import sys
|
||||
import types
|
||||
from _typeshed import StrPath
|
||||
from typing import IO, Any, List, Optional, Protocol, Tuple, TypeVar, Union
|
||||
@@ -57,14 +56,9 @@ def load_package(name: str, path: StrPath) -> types.ModuleType: ...
|
||||
def load_module(name: str, file: Optional[_FileLike], filename: str, details: Tuple[str, str, int]) -> types.ModuleType: ...
|
||||
|
||||
# IO[Any] is a TextIOWrapper if name is a .py file, and a FileIO otherwise.
|
||||
if sys.version_info >= (3, 6):
|
||||
def find_module(
|
||||
name: str, path: Union[None, List[str], List[os.PathLike[str]], List[StrPath]] = ...
|
||||
) -> Tuple[IO[Any], str, Tuple[str, str, int]]: ...
|
||||
|
||||
else:
|
||||
def find_module(name: str, path: Optional[List[str]] = ...) -> Tuple[IO[Any], str, Tuple[str, str, int]]: ...
|
||||
|
||||
def find_module(
|
||||
name: str, path: Union[None, List[str], List[os.PathLike[str]], List[StrPath]] = ...
|
||||
) -> Tuple[IO[Any], str, Tuple[str, str, int]]: ...
|
||||
def reload(module: types.ModuleType) -> types.ModuleType: ...
|
||||
def init_builtin(name: str) -> Optional[types.ModuleType]: ...
|
||||
def load_dynamic(name: str, path: str, file: Any = ...) -> types.ModuleType: ... # file argument is ignored
|
||||
|
||||
Reference in New Issue
Block a user