Make cell-magics opt-in rather than opt-out
See original GitHub issueCurrently, nbqa tries to process all cell magics except those in
I think we should do the opposite: never process cell magics, except for some hard-coded common ones like matplotlib inline
and timeit
, + add a command-line argument so users can pass extra ones they might want to process
This means deprecating nbqa_ignore_cells
and instead adding nbqa_process_cells
.
IMO it’s OK to make a 0.6.0 release with this breaking change in - this is a relatively new project, and it’s not like the user-base is large enough that we need to go through a deprecation cycle
cc @nbQA-dev/nbqa-core in case anyone has any comments - else I’ll try to work on during the weekend
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
ipython/magic.py at main
written as completely standalone functions rather than trying to share code. # and make a single one with convoluted logic.
Read more >Module: core.magic — IPython 8.7.0 documentation
Each value is a dict keyed by magic name whose value is the function docstring. If a docstring is unavailable, the value of...
Read more >IPython cell magic for C# usage in jupyter notebooks ...
Last week I noticed a blog post on how to use C# magic cells with pythonnet from IPython kernel by Xavier Dupré @sdpython...
Read more >15 Data Science hacks to speed up analysis
We can alter or modify the ast_note_interactivity kernel option to make Jupyter do this ... Its combined editions comprise more than 60 million...
Read more >nbqa Changelog
Processing cell-magics is now opt-in rather than opt-out. Original output from tool is always printed with ``--nbqa-diff``.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yup - have gone with erroring in #559
IMHO making the option error or at least warn that it will be ignored, and point to this issue or somewhere in the docs is the most user-friendly and yet simple solution.