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 static type hints #293

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add static type hints #293

wants to merge 1 commit into from

Commits on Oct 4, 2024

  1. Add static type hints

    Add static type hints, and switch to literals for some dicts to improve type inference (and it's nicer code anyway).
    
    This makes the code easier to understand and navigate, and also detected a few of bugs:
    
    1. Missing brackets on `e.upper`.
    2. `ext_name` may not exist on line 399 (I haven't fixed this).
    3. Not strictly related to types, but a lot of the regexes were not raw strings and therefore contained invalid escape sequences. Python prints a warning about these in recent versions.
    
    It is currently not verified in CI by pyright, but that will come in a future MR. These changes were just verified by VSCode.
    Timmmm committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    7a6e01b View commit details
    Browse the repository at this point in the history