-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not compatible with pre-commit-hooks/pretty-format-json
hook
#185
Comments
pre-commit/pretty-format-json
hookpre-commit-hooks/pretty-format-json
hook
Hey @rusmux, I was running into the same situation and took a deep dive at what is happening. Here are the results The root of the issue is a change in the The "proper" way to fix this would be to align the output of the two tools (they differ in indentation mostly), but I had a hard time reading repos:
- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
hooks:
- id: nbstripout
files: ".ipynb"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: pretty-format-json
exclude_types:
- jupyter
args:
- --autofix |
@dokempf Great job! I will then follow your example, thank you! |
It seems like |
No, I'm using @dokempf suggested solution: - id: pretty-format-json
exclude_types:
- jupyter |
When using this tool with
pretty-format-json
hook from https://pre-commit.com/hooks.html, when they both rerun after each other regardless of the order. I suppose one way to fix this is to makenbstripout
compatible withpretty-format-json
, i.e. it won't run again afterpretty-format-json
formattingThe text was updated successfully, but these errors were encountered: