You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: Output is truncated to only keep the relevant lines
Ruff:
...
/Users/dhruv/playground/python/ruff_test.ipynb:cell_1:0:1: D100 Missing docstring in public module
/Users/dhruv/playground/python/ruff_test.ipynb:cell_1:2:8: F401 [*] `random` imported but unused
...
Flake8:
/Users/dhruv/playground/python/ruff_test.ipynb:cell_1:0:1: D100 Missing docstring in public module
/Users/dhruv/playground/python/ruff_test.ipynb:cell_1:2:1: F401 'random' imported but unused
Notice that D100 is reported at line 0 while F401 is reported at line 2. The former suggests that it's 0-indexed while the latter suggests it's 1-indexed. This is happening because of the CODE_SEPARATOR inserted between each code cells:
# %%NBQA-CELL-SEP8e47a4importmathimportrandom
Ruff version: 0.0.269
nbqa version: 1.7.0
flake8 --version:
6.0.0 (flake8-bugbear: 23.5.9, flake8-docstrings: 1.7.0, flake8-pyi: 23.5.0, flake8_implicit_str_concat: 0.4.0, mccabe: 0.7.0, pycodestyle: 2.10.0, pyflakes: 3.0.1) CPython 3.11.3 on Darwin
The text was updated successfully, but these errors were encountered:
Jupyter notebook content
Cell count: 1
Command
$ nbqa --nbqa-shell ruff /path/to/notebook.ipynb --select=ALL
OR
$ nbqa --nbqa-shell flake8 /path/to/notebook.ipynb
Output
Note: Output is truncated to only keep the relevant lines
Ruff:
Flake8:
Notice that
D100
is reported at line 0 whileF401
is reported at line 2. The former suggests that it's 0-indexed while the latter suggests it's 1-indexed. This is happening because of theCODE_SEPARATOR
inserted between each code cells:0.0.269
1.7.0
flake8 --version
:The text was updated successfully, but these errors were encountered: