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
This splits the pre-commit hook for black into two hooks, both
using the same repo and id but separately aliased:
- black-check, which checks but does not modify files. This only
runs when the manual stage is specified, and it is used by tox
and on CI, with tox.ini and lint.yml modified accordingly.
- black-format, which autoformats code. This provides the behavior
most users will expect from a pre-commit hook for black. It runs
automatically along with other hooks. But tox.ini and lint.yml,
in addition to enabling the black-check hook, also explicitly
skip the black-format hook.
The effect is that in ordinary development the pre-commit hook for
black does auto-formatting, but that pre-commit continues to be
used effectively for running checks in which code should not be
changed.
0 commit comments