Skip to content

isort Diagnostic Suggestion continues to appear after sorting and on non-import lines #20236

@timgranata

Description

@timgranata

Type: Bug

Behaviour

isort suggestion on imports appears even after performing the suggested fixes/sorting. It also appears on non-import lines.

Expected vs. Actual

Expected suggestion to not appear anymore after performing suggestions action, but it still appears.

isortt

Steps to reproduce:

  1. Make sure isort is enabled
  2. In a Python file, sort your imports using the suggestion
  3. After applying the suggestion, hover cursor over import again to see the diagnostic is still present
  4. Hover cursor over a non-import line and see suggestion appear

Diagnostic data

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

XXX

User Settings


languageServer: "Pylance"

testing
• pytestEnabled: true

Extension version: 2022.18.2
VS Code version: Code 1.73.1 (6261075646f055b99068d3688932416f2346dd3b, 2022-11-09T04:27:29.066Z)
OS version: Windows_NT x64 10.0.19042
Modes:
Sandboxed: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz (8 x 2304)
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
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 31.73GB (13.69GB free)
Process Argv --folder-uri file:///c%3A/test/vitr-testing-vat-compliance/gc-automation --crash-reporter-id e39591ec-78e4-4f97-988e-1a8f99c3a7d4
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
pyindex848cf:30577861
nodejswelcome1:30587005
fc301958:30595537
3biah626:30602489
gswce1:30612156
3d0df643:30608728
dbltrim-noruby:30604474
89544117:30607850

Metadata

Metadata

Assignees

Labels

triage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions