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

Add type annotations to the project and run mypy on CI #261

Merged
merged 1 commit into from
Jun 29, 2022
Merged

Add type annotations to the project and run mypy on CI #261

merged 1 commit into from
Jun 29, 2022

Commits on Jun 28, 2022

  1. Add type annotations to the project and run mypy on CI

    This helps consumers of chardet ensure that they are using the provided
    API correctly. The project includes a py.typed file for PEP-561
    compliance.
    
    This also helps ensure internal correctness and consistency. Adding the
    static type checking caught at least one suspect pattern in
    chardet/hebrewprober.py where an int value was compared to
    string (probably leftover from Python 2 support).
    
    Type checking will run on all pull requests through GitHub actions and
    pre-commit.
    jdufresne committed Jun 28, 2022
    Configuration menu
    Copy the full SHA
    e3bfe47 View commit details
    Browse the repository at this point in the history