Warning if a magic command is above the imports in a notebook
HenryDashwood opened this issue · 1 comments
Ruff: 0.1.6
Ruff-VSCode: v2023.50.0
Currently Ruff complains if you have magic commands about the imports in a notebook. But for something like autoreload
, I obviously want to run this before importing anything.
Are there any plans to support this? Or is there a way to configure ruff to allow magic commands to be placed above the imports?
Hey, thanks for highlighting this issue. We're planning to fix this as part of astral-sh/ruff#8669. I'll close this one in favor of that. This is probably the last rule which needs updating for Jupyter Notebook. That said, if you think there are any other rules, which aren't mentioned in the linked issue, that are worth updating for Jupyter Notebook, please do suggest :)