You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Marco Gorelli edited this page Oct 11, 2020
·
8 revisions
Python Code Style
Some code-quality checks are performed during continuous integration. The easiest way to check that they pass locally,
before submitting your pull request, is by using pre-commit <https://pre-commit.com/>_.
Steps to get set up are (run these within your virtual environment):
install:
pip install pre-commit
enable:
pre-commit install
Now, whenever you stage some file, then when you run git commit -m "<some descriptive message>", pre-commit will run
the checks defined in .pre-commit-config.yaml and will block your commit if any of them fail. If any hook fails, you
should fix it (if necessary), run git add <files> again, and then re-run git commit -m "<some descriptive message>".
You can skip pre-commit using --no-verify, e.g.
git commit -m "wip lol" --no-verify
To skip one particular hook, you can set the SKIP environment variable. E.g. (on Linux):