Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning if a magic command is above the imports in a notebook #328

Closed
HenryDashwood opened this issue Nov 28, 2023 · 1 comment
Closed

Comments

@HenryDashwood
Copy link

HenryDashwood commented Nov 28, 2023

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?

image
@dhruvmanila
Copy link
Member

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 :)

@dhruvmanila dhruvmanila closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants