Skip to content

Commit

Permalink
FileFinder takes a class, not an instance (#7085) (#7086)
Browse files Browse the repository at this point in the history
The FileFinder takes a tuple of (class, arguments) to instantiate for
each time, rather than an existing instance.

Fixes #7085
  • Loading branch information
Spindel committed Jan 30, 2022
1 parent 1a71371 commit 1365926
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stdlib/importlib/machinery.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ def all_suffixes() -> list[str]: ...

class FileFinder(importlib.abc.PathEntryFinder):
path: str
def __init__(self, path: str, *loader_details: tuple[importlib.abc.Loader, list[str]]) -> None: ...
def __init__(self, path: str, *loader_details: tuple[type[importlib.abc.Loader], list[str]]) -> None: ...
@classmethod
def path_hook(
cls, *loader_details: tuple[importlib.abc.Loader, list[str]]
cls, *loader_details: tuple[type[importlib.abc.Loader], list[str]]
) -> Callable[[str], importlib.abc.PathEntryFinder]: ...

class SourceFileLoader(importlib.abc.FileLoader, importlib.abc.SourceLoader): # type: ignore # argument disparities
Expand Down

0 comments on commit 1365926

Please sign in to comment.