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

Use mypy for static type checking #1275

Merged
merged 2 commits into from
Jan 2, 2021
Merged

Use mypy for static type checking #1275

merged 2 commits into from
Jan 2, 2021

Commits on Jan 1, 2021

  1. Use mypy for static type checking

    Type checking helps give confidence that APIs are being used correctly,
    especially during large refactoring (e.g. eventually dropping Python 2
    support).
    
    This initial pass only includes type annotations that were necessary to
    make mypy pass. Future pull requests will add types for the rest of the
    project once the workflow is established.
    
    pip has started including type annotation in a subset of its code. When
    major changes to pip are released, the type checking will help identify
    API mismatches and areas to adjust.
    
    mypy is configured to be as strict as possible without introducing
    errors. The configuration is a subset of the --strict CLI argument.
    
    Refs #972
    jdufresne committed Jan 1, 2021
    Configuration menu
    Copy the full SHA
    c227673 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6ed320e View commit details
    Browse the repository at this point in the history