Add lots of Typing for python >=3.12 and Modernize#700
Closed
sakgoyal wants to merge 0 commit into
Closed
Conversation
phw
requested changes
Feb 15, 2026
Collaborator
phw
left a comment
There was a problem hiding this comment.
This is a lot of changes in a single commit, and the result raises during tests.
Overall this commit contains several unrelated changes:
- Getting rid of Python 2 specfics
- Add type hinting
- Different changes to more modern alternatives, like replacing c-style replacements with f-strings
- Some random code changes that are more a stylistic preference
It would be better to separate those changes and focus on one aspect in this PR.
| def main(argv: list[str]) -> None: | ||
| parser = ID3OptionParser() | ||
| parser.add_option( | ||
| _ = parser.add_option( |
Collaborator
There was a problem hiding this comment.
I don't really see the point of those assignments. They just make the code noisy, but are not needed. This is scattered all over the code now. Not every function call needs to be assigned to a variable.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modernize this project by adding type hints to everything.
Work in Progress PR. getting the code to pass with
mypyis extremely challenging given how the project is set up with mixins, multiple inheritance, decorators, etc.There is a high chance I missed something or got some types wrong. I would greatly appreciate some help getting this working. Currently sitting at ~350 errors on mypy.
Major blockers: fix import cycle chains, figuring out generic typing for the
loadfile()decorator. it makes it really hard for the LSP to see what's happening without types