Skip to content

Wrong signature of "importlib.util.spec_from_loader" and "spec_from_file_location" #5117

Description

@KmolYuan

spec_from_loader and spec_from_file_location should return Optional[importlib.machinery.ModuleSpec], just like find_spec does.

Currently, MyPy complains that my none check is unreachable.

Activity

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