Adding precommit with black and pyupgr#119
Merged
Merged
Conversation
pamelafox
commented
Oct 13, 2022
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v2.3.0 | ||
| hooks: | ||
| - id: check-yaml |
Member
Author
There was a problem hiding this comment.
I removed two hooks that are fairly standard, end-of-file-fixer and trailing-whitespace, since they touched so many files, and I don't feel strongly about them. But I can add those in a follow-up PR if you like those checks.
Codecov Report
@@ Coverage Diff @@
## main #119 +/- ##
=======================================
Coverage 88.94% 88.94%
=======================================
Files 11 11
Lines 2098 2098
=======================================
Hits 1866 1866
Misses 232 232 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
tonybaloney
reviewed
Oct 16, 2022
| if data: | ||
| try: | ||
| super(DelegatingUDPRequestHandler, self).finish() | ||
| super().finish() |
tonybaloney
approved these changes
Oct 16, 2022
Closed
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.
As suggested in #109, this PR adds pre-commit hooks using the pre-commit package. To start off with, it has the yaml-fixer hook, the black hook, and the pyupgrade hook. I think it's nice to run pyupgrade on tests too, so I didn't exclude the tests from it, but I can exclude them if you feel otherwise.
I'll send a follow-up PR adding isort since that'll change a bunch of files.