mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-08 05:04:44 +08:00
Replace PathLike unions with aliases from _typeshed (#5467)
Standardize on 'from os import PathLike'
This commit is contained in:
1 parent
d72b1e8149
commit
e5abd08f93
9 files changed
+30
-28
No files matched your search
+2
-2
@@ -1,6 +1,6 @@
|
||||
import os
|
||||
import types
|
||||
from _typeshed import StrPath
|
||||
from os import PathLike
|
||||
from typing import IO, Any, List, Optional, Protocol, Tuple, TypeVar, Union
|
||||
|
||||
from _imp import (
|
||||
@@ -57,7 +57,7 @@ def load_module(name: str, file: Optional[_FileLike], filename: str, details: Tu
|
||||
|
||||
# IO[Any] is a TextIOWrapper if name is a .py file, and a FileIO otherwise.
|
||||
def find_module(
|
||||
name: str, path: Union[None, List[str], List[os.PathLike[str]], List[StrPath]] = ...
|
||||
name: str, path: Union[None, List[str], List[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]: ...
|
||||
|
||||
Reference in new issue
Block a user