Skip to content

Commit

Permalink
chore: Use black-jupyter pre-commit hook over nbqa-black (#304)
Browse files Browse the repository at this point in the history
* Use jupyter-black pre-commit hook id from Black
   - black-jupyter will run on Python and pyi files, so it replaces the black hook id as well
* Remove nbqa-black pre-commit hook from nbQA
   - Marco Gorelli essentially contributed nbqa-black to Black in the form of jupyter-black
* Update the pyupgrade version used as an additional_dependencies to match that of the pyupgrade hook
  • Loading branch information
matthewfeickert committed Sep 12, 2021
1 parent ebe1c50 commit 0d82f0b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .pre-commit-config.yaml
Expand Up @@ -2,7 +2,7 @@ repos:
- repo: https://github.com/psf/black
rev: 21.8b0
hooks:
- id: black
- id: black-jupyter

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
Expand Down Expand Up @@ -38,10 +38,8 @@ repos:
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.1.0
hooks:
- id: nbqa-black
additional_dependencies: [black==20.8b1]
- id: nbqa-pyupgrade
additional_dependencies: [pyupgrade==2.12.0]
additional_dependencies: [pyupgrade==2.25.0]
args: ["--py37-plus"]

- repo: https://github.com/pycqa/flake8
Expand Down

0 comments on commit 0d82f0b

Please sign in to comment.