Closed tovrstra closed 1 year ago
sure, PRs welcome
What do you think is the best way to go?
The first would be easy. The second will take a bit longer, but should not be too hard either.
If it's added as an example, there should be tests - do you want to go about adding them? There's examples of other tools, a simple one with --nbqa-diff
should be fine
Sure thing. I wouldn't mind adding tests too. I'll see how the example idea works out and make a PR for it.
closing for now as there's been no activity here in several months, but feel free to open a PR if you'd still like this
The following works with nbQA (1.5.2) and docformatter (1.5.0).
The
-i
option is needed to tell docformatter to modify the notebook in-place.For those using pre-commit, the following configuration can be used:
It might be useful to support docformatter out of the box in nbQA, or to show this example in the documentation. (The documentation already explains how to get custom tools to work, but a working example is always nice to have.)
Here is an example notebook to try out the above setup: example_nbqa_docformatter.zip