diff --git a/py/path.pyi b/py/path.pyi index 1ddab960..86cdcce1 100644 --- a/py/path.pyi +++ b/py/path.pyi @@ -2,6 +2,7 @@ from typing import Any, AnyStr, Callable, ContextManager, Generic, IO, Iterable, from typing_extensions import Final, Literal import os import sys +from types import ModuleType class _FNMatcher(Generic[AnyStr]): pattern: AnyStr = ... @@ -161,7 +162,7 @@ class local(_PathLike[str]): self, modname: Optional[str] = ..., ensuresyspath: Union[bool, Literal["append", "importlib"]] = ..., - ) -> Any: ... + ) -> ModuleType: ... def pypkgpath(self) -> Optional[local]: ... def read(self, mode: str = ...) -> Union[Text, bytes]: ... def read_binary(self) -> bytes: ...