Skip to content

sys.meta_path has incorrect type #5276

Closed

Description

@mniip

The docs aren't super clear about this, but in practice the list actually contains classes (not objects), that implement MetaPathFinder, meaning meta_path : List[Type[MetaPathFinder]] instead of List[MetaPathFinder].

Activity

  1. Akuli commented on May 2, 2021

    @Akuli
    Collaborator

    I think objects in sys.meta_path don't have to be classes, so Type[MetaPathFinder] isn't adequate either. Maybe we should use a Protocol? That way we could say "the objects in sys.meta_path have these methods, whatever type they actually have".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions