mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
spec_from_loader and spec_from_file_location can return None (#5224)
Closes #5117
This commit is contained in:
@@ -21,14 +21,14 @@ def spec_from_loader(
|
||||
*,
|
||||
origin: Optional[str] = ...,
|
||||
is_package: Optional[bool] = ...,
|
||||
) -> importlib.machinery.ModuleSpec: ...
|
||||
) -> Optional[importlib.machinery.ModuleSpec]: ...
|
||||
def spec_from_file_location(
|
||||
name: str,
|
||||
location: Optional[Union[str, bytes, os.PathLike[str], os.PathLike[bytes]]] = ...,
|
||||
*,
|
||||
loader: Optional[importlib.abc.Loader] = ...,
|
||||
submodule_search_locations: Optional[List[str]] = ...,
|
||||
) -> importlib.machinery.ModuleSpec: ...
|
||||
) -> Optional[importlib.machinery.ModuleSpec]: ...
|
||||
def module_from_spec(spec: importlib.machinery.ModuleSpec) -> types.ModuleType: ...
|
||||
|
||||
class LazyLoader(importlib.abc.Loader):
|
||||
|
||||
Reference in New Issue
Block a user