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
It took me a little while, but I finally figured out the use of notebook.source.fixAll and notebook.source.organizeImports settings (instead of their source.* counterparts) to prevent vscode from turning my import cells in jupyter notebooks into gibberish when using ruff as the formatter. However, it appears that when a notebook starts with a markdown cell (say, to title the notebook) and then has a python cell with imports after the markdown, notebook.source.organizeImports doesn't work. Here are my relevant vscode settings:
Side Note:
If I use source.organizeImports instead of notebook.source.organizeImports, it "works" in the sense that something happens, but the effect is to introduce gibberish. Here's an example of the "gibberish" that occurs when using source.* instead of notebook.source.*. The first screenshot is from "pre-save", the second is after saving once, and the third after saving a second time
The text was updated successfully, but these errors were encountered:
It took me a little while, but I finally figured out the use of
notebook.source.fixAll
andnotebook.source.organizeImports
settings (instead of theirsource.*
counterparts) to prevent vscode from turning my import cells in jupyter notebooks into gibberish when using ruff as the formatter. However, it appears that when a notebook starts with a markdown cell (say, to title the notebook) and then has a python cell with imports after the markdown,notebook.source.organizeImports
doesn't work. Here are my relevant vscode settings:And here's the relevant part of my
pyproject.toml
file in the workspace open in vscode:I'm using ruff 0.6.2.
Side Note:
If I use
source.organizeImports
instead ofnotebook.source.organizeImports
, it "works" in the sense that something happens, but the effect is to introduce gibberish. Here's an example of the "gibberish" that occurs when usingsource.*
instead ofnotebook.source.*
. The first screenshot is from "pre-save", the second is after saving once, and the third after saving a second timeThe text was updated successfully, but these errors were encountered: