Closed rdturnermtl closed 5 years ago
This is now the 3rd pr for pre-commit. Can you elaborate how your implementation differs from #79 or #91 ?
Also see the discussion on #79: I (still) don't understand the workflow. nbstripout
is not a hook, it's a non-destructive filter. What am I missing?
It takes a while to grasp how things work and how things differ.
My current understanding, which i think is exactly what you just said @kynan but in my words, is that this filter behavior preserves things locally, while a pre-commit hook may be used to change the file ahead of a commit and that would actually force the user to influence their notebooks locally.
So, what is preferred, filter behavior or destructive hook behavior? Filter behavior is nicer I think, but it took a while for me to get the difference ^^.
Closing this in favour of #79 which I just merged.
This config file makes the nbstripout package compatible with the pre-commit commit hooks package. Using my fork you just need to add:
to a
.pre-commit-config.yaml
in a repo to make it use nbstripout as a hook.After merging into this repo, the new yaml config will be: