Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add pre-commit #321

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

Merged
merged 1 commit into from
Mar 6, 2025
Merged

Add pre-commit #321

merged 1 commit into from
Mar 6, 2025

Conversation

cclauss
Copy link
Member

@cclauss cclauss commented Mar 4, 2025

https://pre-commit.com

% pipx install pre-commit # or uv tool install pre-commit
% pre-commit install

pre-commit installed at .git/hooks/pre-commit

% pre-commit autoupdate

[https://github.com/codespell-project/codespell] already up to date!
[https://github.com/tox-dev/pyproject-fmt] already up to date!
[https://github.com/abravalheri/validate-pyproject] already up to date!

% pre-commit run --all-files

codespell................................................................Passed
pyproject-fmt............................................................Passed
Validate pyproject.toml..................................................Passed

% git commit -am"Add pre-commit"

codespell................................................................Passed
pyproject-fmt............................................................Passed
Validate pyproject.toml..................................................Passed
[pre-commit 6dcbda1] Add pre-commit
 3 files changed, 40 insertions(+), 9 deletions(-)
 create mode 100644 .pre-commit-config.yaml

@aaronliu0130
Copy link
Member

aaronliu0130 commented Mar 6, 2025 via email

@cclauss
Copy link
Member Author

cclauss commented Mar 6, 2025

Let's drop flake8 so we can get pre-commit in place.

@cclauss
Copy link
Member Author

cclauss commented Mar 6, 2025

Please read the first few paragraphs of the README of https://github.com/psf/black

@aaronliu0130 aaronliu0130 merged commit cba132c into develop Mar 6, 2025
@cclauss cclauss deleted the pre-commit branch March 6, 2025 22:35
@aaronliu0130
Copy link
Member

Actions in this workflow must be: within a repository owned by cpplint, created by GitHub, or verified in the GitHub Marketplace.

Apparently it's not verified in the marketplace. I should've noticed that no tests were run. The workflow's page also says it's in maintenance-only mode and suggests "generally you want to use pre-commit.ci which is faster and has more features." which is an entirely separate GitHub app. @cclauss, I'm assuming you can't disable whatever repo setting that's causing the workflow verification requirement either? Should we just remove the pre-commit CI and just have tox run pre-commit instead?

Also, I've thought about it a bit, and I no longer object to the removal of extra string indentation.

@cclauss
Copy link
Member Author

cclauss commented Mar 6, 2025

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.

3 participants