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
I've been using the black-jupyter pre-commit hook and was trying to update to the pre-commit mirror documented in #3828. However, the mirrored hook does not seem to reformat any files.
With this entry in my .pre-commit-config.yaml and Jupyter notebook test.ipynb, running pre-commit run --hook-stage manual black-jupyter --files=test.ipynb does not reformat the notebook.
With this entry in my .pre-commit-config.yaml and the same test.ipynb, running pre-commit run --hook-stage manual black-jupyter --files=test.ipynb does reformat the notebook.
brianhou
changed the title
Mirrored black-jupyter pre-commit hook doesn't work
Mirrored black-jupyter pre-commit hook does not reformat notebooks
Aug 12, 2023
brianhou
changed the title
Mirrored black-jupyter pre-commit hook does not reformat notebooks
Mirrored pre-commit hook does not reformat notebooks
Aug 12, 2023
Hmm the mirror probably needs to specify a jupyter extra that installs black[jupyter] (since .[jupyter] no longer refers to the same thing between the two repos)
Okay, I've fixed this. You'll need to run pre-commit clean or set rev to a sha like 4f9accde9875c9559acf6d12a3eefeee0fd722f1 in order to pick this up. Thanks for reporting!
I've been using the
black-jupyter
pre-commit hook and was trying to update to the pre-commit mirror documented in #3828. However, the mirrored hook does not seem to reformat any files.Describe the bug
To Reproduce
test.ipynb.txt (rename to remove the
.txt
extension)With this entry in my
.pre-commit-config.yaml
and Jupyter notebooktest.ipynb
, runningpre-commit run --hook-stage manual black-jupyter --files=test.ipynb
does not reformat the notebook.With this entry in my
.pre-commit-config.yaml
and the sametest.ipynb
, runningpre-commit run --hook-stage manual black-jupyter --files=test.ipynb
does reformat the notebook.Expected behavior
The
black-jupyter
hook from the pre-commit mirror should reformat Jupyter notebooks.Environment
Additional context
The text was updated successfully, but these errors were encountered: