microsoft / vscode-pylint

Linting support for python using the pylint library.
https://marketplace.visualstudio.com/items?itemName=ms-python.pylint
MIT License
70 stars 34 forks source link

pylint import error false positive possibly not respecting .env #559

Closed syagev closed 3 months ago

syagev commented 3 months ago

Type: Bug

  1. Update pythonpath in a .env file at the workspaceFolder root
  2. Using pylint extension (both useBundled/fromEnvironment), on an import statement that relies on the above PYTHONPATH, a wrong import-error is recieved (pylance does not have an import error on the same statement)

Looking at the pylint extension output console, running the same command in a venv activated terminal does not show the import-error.

Extension version: 2023.10.1 VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:13:33.891Z) OS version: Windows_NT x64 10.0.22631 Modes: Connection to 'attached-container+7b22636f6e7461696e65724e616d65223a222f776f6e64657266756c5f6e6577746f6e227d@tunnel+ilabs-gpuwin004' could not be established

System Info |Item|Value| |---|---| |CPUs|12th Gen Intel(R) Core(TM) i9-12950HX (24 x 2496)| |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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|127.67GB (90.30GB free)| |Process Argv|--folder-uri vscode-remote://attached-container%2B7b22636f6e7461696e65724e616d65223a222f776f6e64657266756c5f6e6577746f6e227d@tunnel%2Bilabs-gpuwin004/workspaces/batman --crash-reporter-id 7a683ffe-ed86-4a3e-874f-e3e57dfd3491| |Screen Reader|no| |VM|0%| Connection to 'attached-container+7b22636f6e7461696e65724e616d65223a222f776f6e64657266756c5f6e6577746f6e227d@tunnel+ilabs-gpuwin004' could not be established
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscoreces:30445986 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 666c4381:30973075 showvideoc:31016891 chatpanelt:31048053 dsvsc021:30996838 9c06g630:31013171 pythoncenvptcf:31049071 fchga941:31046352 pythonprc:31047982 dwnewjupytercf:31046870 26j00206:31048877 ```
karthiknadig commented 3 months ago

Duplicate of https://github.com/microsoft/vscode-pylint/issues/433