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

Use pre-commit #396

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Conversation

kurtmckee
Copy link
Contributor

@kurtmckee kurtmckee commented Jan 29, 2025

I saw in #290 that not only are there flake8 issues, but that pre-commit was desirable for the project. Great!

This PR introduces a number of pre-commit hooks that format and lint the code. I also manually fixed all of the flake8 issues, as well as an issue found by actionlint.

Note

I am not adding pre-commit to CI; instead, you should enable pre-commit.ci for the repo, which has the following benefits:

  • PR branches will be auto-updated with an additional commit by pre-commit.ci if code formatters make changes.
  • pre-commit.ci will submit PRs once each quarter to auto-update the hook versions as new versions are released.

For these reasons, running pre-commit in GitHub Actions is not the best practice.

Closes #290


@JessicaTegner I'm going to pause contributions for now until I hear back about the existing PRs. Any other work that I might do in parallel would likely have merge conflicts with this PR, for example.

Thanks for reviewing some of my previous PRs already! 🥳

@kurtmckee
Copy link
Contributor Author

I'm working on addressing the merge conflicts now.

@JessicaTegner
Copy link
Owner

Hey @kurtmckee

Thank so much for all your prs. Amazing work 🎉

All your other prs has been merged in, so this is the last one (for now) remaining.

After this one, feel free to add another pr with the ci changes if you wish, if not, just let me know :)

Thanks again.
PS: Feel free to add yourself to the list, and just write a quick oneliner with everything you did :)

@kurtmckee
Copy link
Contributor Author

add another pr with the ci changes

I won't be able to set up pre-commit.ci for the repo. It's a GitHub app that you -- as the repo owner -- have to authorize. I highly recommend doing so!

I added myself to the bottom of the contributors list.

Have a great day!

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.

Reduce the number of flake8 errors/warnings
2 participants