microsoft / vscode-isort

Import sorting for python using the isort library.
https://marketplace.visualstudio.com/items?itemName=ms-python.isort
MIT License
91 stars 22 forks source link

No `Organize Imports` or `Python Refactor: Sort Imports` options available in Jupyter Notebooks #303

Open torext opened 1 year ago

torext commented 1 year ago

Type: Bug

Using version 2023.10.0 of the extension there are no options anymore to sort imports in notebook cells. In previous versions, e.g. 2022.8.0, the options were available and worked fine on saved notebooks.

Extension version: 2023.10.0 VS Code version: Code 1.80.0 (660393deaaa6d1996740ff4880f1bad43768c814, 2023-07-04T13:39:48.236Z) OS version: Linux x64 5.15.0-76-generic Modes: Remote OS version: Linux x64 5.15.0-46-generic

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-7500T CPU @ 2.70GHz (4 x 2700)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|1, 2, 1| |Memory (System)|7.62GB (2.44GB free)| |Process Argv|-n --crash-reporter-id 19264bd0-28fa-49c3-b592-4ad556e17f7b| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|ubuntu| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|ubuntu| |XDG_SESSION_TYPE|x11| |Item|Value| |---|---| |Remote|SSH: servername| |OS|Linux x64 5.15.0-46-generic| |CPUs|Intel(R) Core(TM) i9-7940X CPU @ 3.10GHz (28 x 1200)| |Memory (System)|62.51GB (52.83GB free)| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30410667 py29gd2263cf:30784848 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 2e4cg342:30602488 pyind779:30671433 f6dab269:30613381 pythonsymbol12:30671437 a9j8j154:30646983 showlangstatbar:30737416 vsctsb:30748421 pythonms35:30701012 03d35959:30757346 pythonfmttext:30731395 pythoncmvfstrcf:30756944 f8hc8238:30694864 fixshowwlkth:30771522 showindicator:30785052 pythongtdpath:30769146 i26e3531:30780429 pythonnosm12tcf:30779713 pythonidxpt:30784022 pythonnoceb:30776495 ```
ed1d1a8d commented 1 year ago

Can also confirm that I have this issue with the latest release version of the isort extension, but that things work great with 2022.8.0. Would love a fix, was really annoyed that I didn't have the ability to sort imports anymore in my notebooks.

Koen1999 commented 10 months ago

A related issue is #384, which might need addressing first before exposing (partially) broken functionality.