flake8-nb
flake8-nb copied to clipboard
[BUG] Cells which start with `%%html` lead to SyntaxError
Describe the bug
%%html
at the start of a cell can be used to output raw html. flake8-nb fails with E999 SyntaxError: invalid syntax
.
To Reproduce Have a cell like
%%html
<a href="#">asd</a>
in the notebook and run flake8-nb
Expected behavior These cells should be ignored like other non-code cells.
Desktop (please complete the following information):
- OS: Windows 10 x64
- Version: Python 3.8.10 with
flake8-nb==0.3.1
Thanks for reporting this bug!
For the time being, you can use the cell tag flake8-noqa-cell
.
But I agree that cells with cell magic, which isn't ExecutionMagics
line %%timeit
or explicitly defines the code as python code (%%python
) should be dropped by default.
@all-contributors please add @Dobatymo for bug