-
Notifications
You must be signed in to change notification settings - Fork 564
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
use pre-commit to invoke linters #1591
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add bug fixes, new features, breaking changes and anything else you think is worthwhile mentioning to the master (unreleased)
section of CHANGELOG.md. If no CHANGELOG update is needed add the following to the PR description: [x] No CHANGELOG update needed
CHANGELOG updated or no update needed, thanks! 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks solid!
just getting tests to pass and then i'll open this up for review |
i have a few more linters in the works (flake8 plugins) so i'll get those hammered out before we merge. |
Wow, nice improvements. Thanks! |
@ajnelson-nist check out how we integrated pre-commit here (thanks to your pointer). specifically, we use a |
@williballenthin And now you've explained something I hadn't quite understood from the examples I'd drawn from. Local configurations! That's how they'd gotten around pinning-vs-range version freshness issues. This was a fruitful back and forth. Thanks for letting me know what you found! |
adds a pre-commit configuration so that its easy to invoke all of our linter checks w/associated configuration, as well as install the pre-commit and pre-push hooks consistently:
quickstart
do this now @mr-tz @mike-hunhoff @yelhamer @colton-gabertan (FYI)
$ pre-commit install # now pre-commit hook installed!
or if you want to run all the linters on-demand:
$ pre-commit run --all-files
the PR also introduces some additional plugins (and fixes) for flake8:
str.lstrip("many characters here")
"foo" "bar" == "foobar"
print
statements in library codeTODO(author): message
and have an associated link to a tracking github issueim really excited about some of these lints (like logging format), since we've often had to explain and manually check for these during PR reviews. the other ones enforce better hygiene (imho).
closes #1579
closes #1391
Checklist