Skip to content

The "module is installed, but missing library stubs or py.typed marker" message should be more informative #20192

@wyattscarpenter

Description

@wyattscarpenter

The "module is installed, but missing library stubs or py.typed marker" message should be changed (perhaps only in certain circumstances?) to be more informative. Which one is it? We could probably tell the user.

Perhaps it's supposed to be... an "and" type or, saying that you have neither one. In that case it should be rewritten. However, the comment in the relevant source code also strongly implies that one of the two things is happening and we know which but don't tell the user

# The implementation for this module plausibly exists (e.g. we
# found a matching folder or *.py file), but either the parent package
# did not contain a py.typed file or we were unable to find a
# corresponding *-stubs package.
FOUND_WITHOUT_TYPE_HINTS = 1

Possibly it depends on the exact logic of _find_module_non_stub_helper, or some other code I haven't looked in to. (Or maybe that comment also should be rewritten.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions