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

"Organize improts" not in context menu #22562

Closed
vzakharov opened this issue Nov 29, 2023 · 2 comments
Closed

"Organize improts" not in context menu #22562

vzakharov opened this issue Nov 29, 2023 · 2 comments
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@vzakharov
Copy link

Type: Bug

Behaviour

Expected vs. Actual

I expect to see "Organize imports" when I click Cmd+Shift+P or open the context menu while focused on an import.

Steps to reproduce:

  1. Click Cmd+Shift+P in a Python file

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.12.0
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
  • Value of the python.languageServer setting: Default
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

2023-11-29 13:20:26.464 [info] Experiment 'pythonPromptNewFormatterExt' is active
2023-11-29 13:20:26.464 [info] Experiment 'pythonPromptNewToolsExt' is active
2023-11-29 13:20:26.464 [info] Experiment 'pythonRecommendTensorboardExtcf' is active
2023-11-29 13:20:26.464 [info] Experiment 'pythonREPLSmartSend' is active
2023-11-29 13:20:26.464 [info] Experiment 'pythonTestAdapter' is active
2023-11-29 13:20:26.464 [info] Default formatter is set to null for workspace /Users/vova/Documents/GitHub/rand_1
2023-11-29 13:20:26.464 [info] Default formatter is set to null for workspace /Users/vova/Documents/GitHub/tmp
2023-11-29 13:20:26.464 [info] Test server listening.
2023-11-29 13:20:26.464 [info] Python interpreter path: /opt/homebrew/Caskroom/miniconda/base/envs/rand/bin/python
2023-11-29 13:20:28.650 [info] > conda info --json
2023-11-29 13:20:29.616 [info] Starting Pylance language server.
2023-11-29 13:20:31.240 [info] > conda run -n rand --no-capture-output python ~/.vscode/extensions/ms-python.python-2023.20.0/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.20.0/pythonFiles/printEnvVariables.py
2023-11-29 13:20:31.240 [info] shell: bash
2023-11-29 13:20:53.423 [info] Discover tests for workspace name: rand_1 - uri: /Users/vova/Documents/GitHub/rand_1/backend/shared_services/LLM/__init__.py
2023-11-29 13:21:56.184 [info] Discover tests for workspace name: rand_1 - uri: /Users/vova/Documents/GitHub/rand_1/backend/shared_services/LLM/validated.py
2023-11-29 13:22:53.872 [info] Experiment 'pythonPromptNewFormatterExt' is active
2023-11-29 13:22:53.872 [info] Experiment 'pythonPromptNewToolsExt' is active
2023-11-29 13:22:53.872 [info] Experiment 'pythonRecommendTensorboardExtcf' is active
2023-11-29 13:22:53.872 [info] Experiment 'pythonREPLSmartSend' is active
2023-11-29 13:22:53.872 [info] Experiment 'pythonTestAdapter' is active
2023-11-29 13:22:53.906 [info] Default formatter is set to null for workspace /Users/vova/Documents/GitHub/rand_1
2023-11-29 13:22:53.906 [info] Default formatter is set to null for workspace /Users/vova/Documents/GitHub/tmp
2023-11-29 13:22:53.916 [info] Test server listening.
2023-11-29 13:22:53.920 [info] Python interpreter path: /opt/homebrew/Caskroom/miniconda/base/envs/rand/bin/python
2023-11-29 13:22:54.396 [info] > conda info --json
2023-11-29 13:22:55.333 [info] Starting Pylance language server.
2023-11-29 13:22:55.342 [info] > conda run -n rand --no-capture-output python ~/.vscode/extensions/ms-python.python-2023.20.0/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.20.0/pythonFiles/printEnvVariables.py
2023-11-29 13:22:55.342 [info] shell: bash
2023-11-29 13:23:16.217 [info] Experiment 'pythonPromptNewFormatterExt' is active
2023-11-29 13:23:16.217 [info] Experiment 'pythonPromptNewToolsExt' is active
2023-11-29 13:23:16.217 [info] Experiment 'pythonRecommendTensorboardExtcf' is active
2023-11-29 13:23:16.217 [info] Experiment 'pythonREPLSmartSend' is active
2023-11-29 13:23:16.217 [info] Experiment 'pythonTestAdapter' is active
2023-11-29 13:23:16.217 [info] Default formatter is set to null for workspace /Users/vova/Documents/GitHub/rand_1
2023-11-29 13:23:16.217 [info] Default formatter is set to null for workspace /Users/vova/Documents/GitHub/tmp
2023-11-29 13:23:16.219 [info] Test server listening.
2023-11-29 13:23:16.222 [info] Python interpreter path: /opt/homebrew/Caskroom/miniconda/base/envs/rand/bin/python
2023-11-29 13:23:16.729 [info] > conda info --json
2023-11-29 13:23:17.389 [info] > conda run -n rand --no-capture-output python ~/.vscode/extensions/ms-python.python-2023.20.0/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.20.0/pythonFiles/printEnvVariables.py
2023-11-29 13:23:17.389 [info] shell: bash
2023-11-29 13:23:17.569 [info] Starting Pylance language server.
2023-11-29 13:24:01.767 [info] Discover tests for workspace name: rand_1 - uri: /Users/vova/Documents/GitHub/rand_1/backend/shared_services/LLM/__init__.py
2023-11-29 13:26:22.087 [info] Experiment 'pythonPromptNewFormatterExt' is active
2023-11-29 13:26:22.088 [info] Experiment 'pythonPromptNewToolsExt' is active
2023-11-29 13:26:22.088 [info] Experiment 'pythonRecommendTensorboardExtcf' is active
2023-11-29 13:26:22.088 [info] Experiment 'pythonREPLSmartSend' is active
2023-11-29 13:26:22.088 [info] Experiment 'pythonTestAdapter' is active
2023-11-29 13:26:22.131 [info] Default formatter is set to null for workspace /Users/vova/Documents/GitHub/rand_1
2023-11-29 13:26:22.131 [info] Default formatter is set to null for workspace /Users/vova/Documents/GitHub/tmp
2023-11-29 13:26:22.150 [info] Test server listening.
2023-11-29 13:26:22.214 [info] Python interpreter path: /opt/homebrew/Caskroom/miniconda/base/envs/rand/bin/python
2023-11-29 13:26:22.629 [info] > conda info --json
2023-11-29 13:26:23.606 [info] > conda run -n rand --no-capture-output python ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/printEnvVariables.py
2023-11-29 13:26:23.606 [info] shell: bash
2023-11-29 13:26:23.617 [info] Starting Pylance language server.
2023-11-29 13:26:32.472 [info] Send text to terminal: printenv > "/var/folders/ql/f6p20ckx0kn0vrfg9q3b85t40000gn/T/tmp-19625kF7XfoEuIdDV.txt"
2023-11-29 13:26:32.488 [info] Found: /usr/bin/python3 --> /usr/bin/python3
2023-11-29 13:26:32.506 [info] > /opt/homebrew/bin/python3 -I ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/interpreterInfo.py
2023-11-29 13:26:32.508 [info] Found: /opt/homebrew/Caskroom/miniconda/base/bin/python --> /opt/homebrew/Caskroom/miniconda/base/bin/python3.10
2023-11-29 13:26:32.508 [info] Found: /opt/homebrew/Caskroom/miniconda/base/bin/python3 --> /opt/homebrew/Caskroom/miniconda/base/bin/python3.10
2023-11-29 13:26:32.508 [info] Found: /opt/homebrew/Caskroom/miniconda/base/bin/python3.1 --> /opt/homebrew/Caskroom/miniconda/base/bin/python3.10
2023-11-29 13:26:32.509 [info] Found: /opt/homebrew/Caskroom/miniconda/base/bin/python3.10 --> /opt/homebrew/Caskroom/miniconda/base/bin/python3.10
2023-11-29 13:26:32.509 [info] > ~/.pyenv/versions/3.6.15/bin/python -I ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/interpreterInfo.py
2023-11-29 13:26:32.514 [info] Found: /opt/homebrew/bin/python3 --> /opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/bin/python3.11
2023-11-29 13:26:32.516 [info] Found: /opt/homebrew/bin/python3.10 --> /opt/homebrew/Cellar/[email protected]/3.10.12_1/Frameworks/Python.framework/Versions/3.10/bin/python3.10
2023-11-29 13:26:32.516 [info] Found: /opt/homebrew/bin/python3.11 --> /opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/bin/python3.11
2023-11-29 13:26:32.538 [info] > /opt/homebrew/Caskroom/miniconda/base/bin/python -I ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/interpreterInfo.py
2023-11-29 13:26:32.556 [info] > /opt/homebrew/Caskroom/miniconda/base/envs/jukebox/bin/python -I ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/interpreterInfo.py
2023-11-29 13:26:32.573 [info] > /opt/homebrew/Caskroom/miniconda/base/envs/py38/bin/python -I ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/interpreterInfo.py
2023-11-29 13:26:32.626 [info] > /opt/homebrew/Caskroom/miniconda/base/envs/rand/bin/python -I ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/interpreterInfo.py
2023-11-29 13:26:32.649 [info] > /usr/bin/python3 -I ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/interpreterInfo.py
2023-11-29 13:26:32.687 [info] > /opt/homebrew/bin/python3.10 -I ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/interpreterInfo.py
2023-11-29 13:27:37.699 [info] Experiment 'pythonPromptNewFormatterExt' is active
2023-11-29 13:27:37.700 [info] Experiment 'pythonPromptNewToolsExt' is active
2023-11-29 13:27:37.700 [info] Experiment 'pythonRecommendTensorboardExt' is active
2023-11-29 13:27:37.700 [info] Experiment 'pythonREPLSmartSend' is active
2023-11-29 13:27:37.700 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2023-11-29 13:27:37.700 [info] Experiment 'pythonTestAdapter' is active
2023-11-29 13:27:37.740 [info] Default formatter is set to null for workspace /Users/vova/Documents/GitHub/rand_1
2023-11-29 13:27:37.740 [info] Default formatter is set to null for workspace /Users/vova/Documents/GitHub/tmp
2023-11-29 13:27:37.748 [info] Test server listening.
2023-11-29 13:27:37.751 [info] Python interpreter path: /opt/homebrew/Caskroom/miniconda/base/envs/rand/bin/python
2023-11-29 13:27:38.251 [info] > conda info --json
2023-11-29 13:27:38.251 [info] shell: zsh
2023-11-29 13:27:38.265 [info] > conda info --json
2023-11-29 13:27:39.182 [info] > conda run -n rand --no-capture-output python ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/printEnvVariables.py
2023-11-29 13:27:39.183 [info] shell: zsh
2023-11-29 13:27:39.208 [info] > conda run -n rand --no-capture-output python ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/printEnvVariables.py
2023-11-29 13:27:39.208 [info] shell: bash
2023-11-29 13:27:39.222 [info] Starting Pylance language server.
2023-11-29 13:27:40.406 [info] > /usr/bin/python3 ~/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/printEnvVariables.py
2023-11-29 13:27:40.406 [info] shell: zsh
2023-11-29 13:27:40.469 [info] Send text to terminal: /usr/bin/python3 "/Users/vova/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/printEnvVariablesToFile.py" "/Users/vova/.vscode/extensions/ms-python.python-2023.21.13331008/pythonFiles/deactivate/zsh/envVars.txt"

User Settings

Multiroot scenario, following user settings may not apply:

languageServer: "Pylance"

Extension version: 2023.21.13331008
VS Code version: Code 1.84.2 (Universal) (1a5daa3a0231a0fbba4f14db7ec463cf99d7768e, 2023-11-09T10:52:33.687Z)
OS version: Darwin arm64 22.3.0
Modes:

System Info
Item Value
CPUs Apple M2 Pro (10 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 3, 3, 4
Memory (System) 16.00GB (0.03GB free)
Process Argv --crash-reporter-id 9f4b2e90-bda4-4506-bbe4-78e9f16f05f2
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263:30899288
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
282f8724:30602487
f6dab269:30613381
a9j8j154:30646983
showlangstatbar:30737416
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30871694
pythonregdiag2:30871582
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:30885897
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
aa_t_chat:30882232

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Nov 29, 2023
@vzakharov
Copy link
Author

Screen.Recording.2023-11-29.at.13.32.41.mov

Screencast illustrating:

  1. Lack of context menu item
  2. Current extension version (pre-release)
  3. The item is present for e.g. TypeScript

@karthiknadig
Copy link
Member

You need to install either isort extension or ruff extension to get import organization. As for the command in context menu, it was removed based on internal discussion with the overall VS Code team. See here for more details: microsoft/vscode-isort#343

@karthiknadig karthiknadig closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants