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

Avoid get on PackageMetadata in FastAPI template #163

Merged
merged 1 commit into from May 2, 2022
Merged

Commits on May 2, 2022

  1. Avoid get on PackageMetadata in FastAPI template

    The current mypy plus typeshed plus the Python 3.10 core library
    has a bug causing mypy to not think get is a valid method on the
    return value of importlib.metadata.metadata because it returns a
    Protocol that doesn't implement get.  I've filed a issue in case
    this is not intended (python/typeshed#7767),
    but we know that any package created by this template will always
    have Summary and Version metadata, so we can use them
    unconditionally.
    
    Previously, this may not have worked in situations where the
    package was being used uninstalled, but since we now do everything
    including local development servers from inside tox, and make init
    also installs the package for running pytest directly, this should
    no longer be an issue.  setuptools_scm should always generate a
    version, even if it's an unuseful one.
    rra committed May 2, 2022
    Configuration menu
    Copy the full SHA
    b5fe909 View commit details
    Browse the repository at this point in the history