Skip to content

Commit 1365926

Browse files
authored
FileFinder takes a class, not an instance (#7085) (#7086)
The FileFinder takes a tuple of (class, arguments) to instantiate for each time, rather than an existing instance. Fixes #7085
1 parent 1a71371 commit 1365926

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/importlib/machinery.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ def all_suffixes() -> list[str]: ...
123123

124124
class FileFinder(importlib.abc.PathEntryFinder):
125125
path: str
126-
def __init__(self, path: str, *loader_details: tuple[importlib.abc.Loader, list[str]]) -> None: ...
126+
def __init__(self, path: str, *loader_details: tuple[type[importlib.abc.Loader], list[str]]) -> None: ...
127127
@classmethod
128128
def path_hook(
129-
cls, *loader_details: tuple[importlib.abc.Loader, list[str]]
129+
cls, *loader_details: tuple[type[importlib.abc.Loader], list[str]]
130130
) -> Callable[[str], importlib.abc.PathEntryFinder]: ...
131131

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

0 commit comments

Comments
 (0)