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
Fix flake8 issues across the codebase #724
Comments
#792 resolves this, but I need to get unit tests passing locally first so I can fix the issues I've introduced there. |
#792 is dead. However, I've a queue of patches lined up to resolve this that are just waiting on the Python 3 PRs to merge. I'd like to use black to automate the fixing up of most code, followed by some manual tweaks to resolve things it can't fix (like wildcard imports). This will bork git-blame somewhat, but I think that's an acceptable thing to do for the long-term gains we'll see in maintainability. |
One should generally avoid applying large, style-only changes to existing code bases because they tend to make a complete mess of our ability to use 'git-blame' and related tools effectively. With that said, the code base is in pretty bad shape owing to its sheer age and we'd otherwise be fixing this stuff manually for years. Bite the bullet and run all the code through black [1] (specifically, 'black -S', to avoid unnecessary conversion of single quotes to double quotes) to address the worst of the issues. A future change will address the remaining issues like use of wildcard imports and commented out (dead) code. Note that black defaults to a max line length of 88, not 79 [2], which means we need to configure flake8 to allow this. [1] https://pypi.org/project/black/ [2] https://black.readthedocs.io/en/stable/the_black_code_style.html Signed-off-by: Stephen Finucane <stephen@that.guru> Closes: rst2pdf#724 Closes: rst2pdf#711
@ralsina ran
flake8
and found lots of easy to fix warnings.Getting these sorted would be great, but needs to be when we have minimal open PRs as it'll result in lots of conflicts!
The text was updated successfully, but these errors were encountered: