Refactor - Drop EOL Python versions, use types, f-strings, tabs, single quotes, Ruff linter, pyproject.toml, ... #53
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.
v2m.py
is missing, will do that later if I get to it.This is a refactor and also a fix taken from #52, I was already fixing the unicode issue so might as well fix the backslash.
Also fixes calling pygame tostring() with a Literal instead of boolean.
This drops Python 2.7 <-> 3.8, people needing those versions can use the version before this one, they are all End of Life.
Fixes up CI to check the currently supported Python versions.
Adds pyproject.toml which is current standard, only with the linter stuff for now.
Unifies code base to tabs and changes the code where it was problematic when indent width would differ in the view - now everyone can use their preferred code width.
Unified code base to single quotes, as that's what's mostly used.
Fixed up small end of line space issues.
Use f-strings over the old way
Fixed readme.md recommending to run
sudo pip
which fails on all major distributions thanks to a new PEP -> venvs are necessary now.Added return types to a lot of functions/variables, not everywhere though.
This should make maintenance and spotting issues easier - in fact a linter+LSP highlights a bunch, even after this commit.
Apologies for not splitting this into more commits, it could have used that.
I suggest Hiding Whitespace when reviewing - https://github.com/svsdval/video2midi/pull/53/files?diff=split&w=1