Closed likewei92 closed 4 years ago
Just to double check: do you mean pass those in as a command line argument like --extra-keys
?
@kynan sorry for the delayed reply - I meant being able to specify extrakeys
in .pre-commit-config.yaml
, though I think if you supported it in the command line you would be able to specify it in the yaml file as well (through args
)
Thanks, I'll have a look whether we want to support either or both.
Can you give me some examples of extra keys you want to pass on the command line? And do you have an example notebook I could use to test?
I've implemented --extra-keys
. You can use them with pre-commit
e.g. as follows:
repos:
- repo: https://github.com/kynan/nbstripout
rev: fe88889c2a68efebd48a3bf8fe909b6788d62305
hooks:
- id: nbstripout
args: [--extra-keys=metadata.celltoolbar]
Feel free to reopen if this doesn't meet your needs.
That works, thanks!
Current extrakeys is only configurable through
git config (--global) filter.nbstripout.extrakeys
. It would be great if we can configure this when using nbstripout as part of a pre-commit hook as well!