-
-
Notifications
You must be signed in to change notification settings - Fork 2k
PyMC3 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):
SKIP=pyupgrade git commit -m "<descriptive message>"