confine pre-commit to stages (#3940)
See https://pre-commit.com/#confining-hooks-to-run-at-certain-stages > If you are authoring a tool, it is usually a good idea to provide an appropriate `stages` property. For example a reasonable setting for a linter or code formatter would be `stages: [pre-commit, pre-merge-commit, pre-push, manual]`. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
parent
53c4278a4c
commit
7686989fc8
@ -4,6 +4,7 @@
|
|||||||
name: black
|
name: black
|
||||||
description: "Black: The uncompromising Python code formatter"
|
description: "Black: The uncompromising Python code formatter"
|
||||||
entry: black
|
entry: black
|
||||||
|
stages: [pre-commit, pre-merge-commit, pre-push, manual]
|
||||||
language: python
|
language: python
|
||||||
minimum_pre_commit_version: 2.9.2
|
minimum_pre_commit_version: 2.9.2
|
||||||
require_serial: true
|
require_serial: true
|
||||||
@ -13,6 +14,7 @@
|
|||||||
description:
|
description:
|
||||||
"Black: The uncompromising Python code formatter (with Jupyter Notebook support)"
|
"Black: The uncompromising Python code formatter (with Jupyter Notebook support)"
|
||||||
entry: black
|
entry: black
|
||||||
|
stages: [pre-commit, pre-merge-commit, pre-push, manual]
|
||||||
language: python
|
language: python
|
||||||
minimum_pre_commit_version: 2.9.2
|
minimum_pre_commit_version: 2.9.2
|
||||||
require_serial: true
|
require_serial: true
|
||||||
|
@ -45,6 +45,9 @@
|
|||||||
|
|
||||||
<!-- For example, Docker, GitHub Actions, pre-commit, editors -->
|
<!-- For example, Docker, GitHub Actions, pre-commit, editors -->
|
||||||
|
|
||||||
|
- Black's pre-commit integration will now run only on git hooks appropriate for a code
|
||||||
|
formatter (#3940)
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
|
|
||||||
<!-- Major changes to documentation and policies. Small docs changes
|
<!-- Major changes to documentation and policies. Small docs changes
|
||||||
|
Loading…
Reference in New Issue
Block a user