Add pre-commit config and apply all fixes - #2139
Conversation
c806542 to
3f65c3a
Compare
|
I've pinned pre-commit to version 2.17.0, newer releases no longer support Python 3.6 (which reached end of life December of last year). |
Davidy22
left a comment
There was a problem hiding this comment.
Seems mostly fine, nice to get the whitespace cleaner into the chain, just a thing about the black version pinning
Davidy22
left a comment
There was a problem hiding this comment.
At some point we can probably drop support for python 3.6 which'll free up deps that depend on it, and I'm thinking we can bump black when it rolls over to the 2023 standard, but that's something to consider for the future when 3.6 shrinks some more and we actually get to see a 2023 black release. For now, this looks fine, merging.
|
I've noticed a fair few pretty good PRs from you, I wouldn't mind giving you reviewer privileges if you want them. They're far from an obligation to do reviewing, as the long list of inactive people with review rights would attest, but I certainly appreciate seeing more active hands in the project. I've been a bit busy at times myself, changes out of me have been a bit spread apart for a while due to regular work and getting discouraged at trying and failing to reproduce issues so sometimes it takes a while for me to get around to looking at PRs or new issues. |
|
Thanks, I appreciate it. I wouldn't mind being a bit more involved in this project, as I've happily used Guake for years :) |
|
Alright, invite sent |
This PR installs pre-commit in the Pipenv environment, and updates the
make stylecommand to use it (as wel as running before commits, of course).I've configured hooks for the tools that were already used (Flake8, Pylint, Black) and created a new hook for
gsemet/fiximports. This last hook is pinned to a commit hash in my fork for now, but can be updated to a tag once the PR over there is merged.Apart from these hooks, I've enabled
end-of-file-fixer(which ensures files end with a newline) andtrailing-whitespace. Most of the changes are from the initialpre-commit run --all-files.Closes #2031.