-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
3 changed files
with
149 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.