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

check: Add function for parsing import names for local packages #139

Merged
merged 1 commit into from Feb 14, 2023

Commits on Feb 14, 2023

  1. check: Add function for finding import names provided by local packages

    This adds find_import_names_from_package_name() which will use
    importlib.metadata to look up a package name (e.g. a dependency name)
    in the current Python environment, and attempt to find the corresponding
    import names that this package provides.
    
    If the package does not exist in the local environment, or if
    importlib.metadata is not able to find any provided import names, we
    return `None`, and expect the caller to fall back to some other
    mechanism to map the package name into import name(s).
    jherland committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    bfb7f5f View commit details
    Browse the repository at this point in the history