Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdlib/importlib/machinery declares loaders to be instantiated, they should be classes #7085

Closed
Spindel opened this issue Jan 30, 2022 · 0 comments

Comments

@Spindel
Copy link
Contributor

Spindel commented Jan 30, 2022

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

where both cases of loader_details should be Tuple[Type[importlib.abc.Loader, list[str]], as the code itself will create a new instance of the loader passed in.

compared with python 3.10

@Spindel Spindel changed the title tdlib/importlib/machinery declares loaders to be instantiated, they should be classes stdlib/importlib/machinery declares loaders to be instantiated, they should be classes Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant