-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 cli #1914
Add pre-commit cli #1914
Conversation
@slowy07 It only took 4.7 seconds to run the pre-commit. This is so much faster than GitHub Actions! Thank you. https://results.pre-commit.ci/run/github/245837930/1708352021.a_tx5YhiREKyiGb9poDbWQ |
🚀 Deployed on https://65d36c37d3230b24288f5bc0--opengeos.netlify.app |
I have removed codespell from GitHub Actions and added check-large-files and black formatting for pre-commit. |
sir @giswqs , i suggest for fomatter use ruff-formatter, cause is more advance and more usefull and faster than black formatter, cause the ruff based on rust which is extremly fast and more configureable about that, i can do that by submit new pull request for linter and formatter |
@slowy07 It seems ruff supports Jupyter notebook as well. That's great. https://docs.astral.sh/ruff/faq/#does-ruff-support-jupyter-notebooks |
yes sir @giswqs , and for this one, i think mybe are best choice for replacing black formatter |
Adding notebook checking found 830 errors. This will take a while to resolve. Will work on it when I have time. https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.2.2
hooks:
# Run the linter.
- id: ruff
types_or: [ python, pyi, jupyter ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi, jupyter ] |
we can create a configuration for passing or just ignore that error cause the ruff issue with reference: https://docs.astral.sh/ruff/settings/#lint_extend-unsafe-fixes |
ouch, mybe its cause |
This PR adds the pre-commit cli to the repo so that the pre-commit will be run on pull requests and commits.
Reference: #1911