Skip to content
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

Add pre-commit #209

Merged
merged 3 commits into from Feb 7, 2022
Merged

Add pre-commit #209

merged 3 commits into from Feb 7, 2022

Conversation

mattwthompson
Copy link
Contributor

@mattwthompson mattwthompson commented Feb 4, 2022

A bot from https://pre-commit.ci should run in and automatically run black with its most recent version

@mattwthompson
Copy link
Contributor Author

I was wrong, somebody with more permissions in the organization would need to allow the App to access this repo: https://github.com/marketplace/pre-commit-ci

@codecov
Copy link

codecov bot commented Feb 4, 2022

Codecov Report

Merging #209 (0953684) into master (4f33372) will not change coverage.
The diff coverage is 100.00%.

@ptmerz
Copy link
Member

ptmerz commented Feb 4, 2022

I was wrong, somebody with more permissions in the organization would need to allow the App to access this repo: https://github.com/marketplace/pre-commit-ci

I think only @mrshirts can do that!

@mrshirts
Copy link
Contributor

mrshirts commented Feb 4, 2022

Did I manage to activate it correctly?

@mattwthompson
Copy link
Contributor Author

Probably - although I think it's likely the bot won't run until the config file exists on the default branch (i.e. until this is merged). So I didn't give sufficient instructions when asking for help, sorry!

@ptmerz would you consider reviewing this as-is? The changes to the source code are only because of black's recent update. You're probably familiar with git hooks but you could verifiy things locally with i.e.

$ git checkout upstream/add-pre-commit
$ pip install pre-commit
$ pre-commit install
$ pre-commit run --all-files

Depending on interest and effort there's plenty more cool stuff that can be done. But my goal here was only to update with the new version of black and set up automation so that a bot would do it the next time there's an update.

Copy link
Member

@ptmerz ptmerz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thank you @mattwthompson. I played around a bit locally, happy to approve!

@mattwthompson mattwthompson merged commit 2400099 into master Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants