Not detecting variable from previous notebook cells
sh-shahrokhi opened this issue · comments
Shayan Shahrokhi commented
Hi, I'm using ruf-vscode 2023.50.0, ruff 0.1.6, vscode 1.84.2 on Windows 11.
In juoyter notebooks, ruff can't see variables from previous cells.
Ruff extension is set as default python formatter/linter.
Simple code for replication:
colors = ['red', 'orange', 'green', 'blue', 'purple']
in another cell:
colors2 = colors + ['black']
Thanks
Dhruv Manilawala commented
Hey, thanks for opening this issue. This is happening because colors
is possibly a magic command. For more context, refer astral-sh/ruff#8526. I'll close this one in favor of the linked issue.