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

Flake8 Won't Turn Off #21973

Closed
manishvenu opened this issue Sep 12, 2023 · 13 comments
Closed

Flake8 Won't Turn Off #21973

manishvenu opened this issue Sep 12, 2023 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@manishvenu
Copy link

Type: Bug

Flake8 Won't Turn Off! Turned on the linter and then disabled it, and it still was finding problems in my code. Had to use Help: Start extension bisect to fix.

Extension version: 2023.16.0
VS Code version: Code 1.82.0 (8b617bd08fd9e3fc94d14adb8d358b56e3f72314, 2023-09-06T22:07:07.438Z)
OS version: Windows_NT x64 10.0.22621
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-1195G7 @ 2.90GHz (8 x 2918)
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) undefined
Memory (System) 15.72GB (4.48GB free)
Process Argv --crash-reporter-id a2a9f3c8-d0dd-4c4e-ab82-42ad305a092c
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263cf:30792227
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyonecf:30548226
vsccc:30803844
3biah626:30602489
89544117:30613380
showlangstatbar:30737416
962ge761:30831758
03d35959:30757346
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
asynctok:30821568
dsvsc013:30795093
dsvsc014:30804076
diffeditorv2:30821572
dsvsc015:30829745
pythonfb280951cf:30830811

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Sep 12, 2023
@karthiknadig karthiknadig self-assigned this Sep 12, 2023
@karthiknadig
Copy link
Member

@manishrv123 Are you using ms-python.flake8 extension or are you using only ms-python.python extension?

if it is ms-python.python, then you can set python.linting.flake8Enabled to false.

if it is ms-python.flake8 extension, you can disable the extensions for the workspace. Using the extensions view.

@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster labels Sep 12, 2023
@drjmcauliffe
Copy link

@karthiknadig, I've tried both options and I still see flake8 warnings (along side the ruff warnings that i want so see).... ¯_(ツ)_/¯ Not sure what else to do/try...

@drjmcauliffe
Copy link

drjmcauliffe commented Oct 10, 2023

@manishrv123, I installed and then uninstalled ms-python.flake8 and then uninstalled and reinstalled ms-python.python and it appears to have worked... no more flake8 warnings...

OK, so that didn't last... after a restart the flake8 complaints are back...

@shapiromatron
Copy link

I'm having the same issue. Here's the output; I don't have flake8 enabled for my project or globally, and I even tried adding "python.linting.flake8Enabled": false to my settings and that didn't fix it:

2023-10-11 09:16:38.166 [info] > conda run -n hawc311 --no-capture-output python ~\.vscode\extensions\ms-python.python-2023.18.0\pythonFiles\get_output_via_markers.py -c "import flake8"
2023-10-11 09:16:39.140 [error] There was an error in running the linter flake8 [n [Error]: Module 'flake8' not installed.
	at s.execForLinter (c:\Users\ASHAPIRO\.vscode\extensions\ms-python.python-2023.18.0\out\client\extension.js:2:234513)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async c.run (c:\Users\me\.vscode\extensions\ms-python.python-2023.18.0\out\client\extension.js:2:541293)
	at async c.runLinter (c:\Users\me\.vscode\extensions\ms-python.python-2023.18.0\out\client\extension.js:2:545242)]
2023-10-11 09:16:39.140 [error] Support for "flake8" is moved to ms-python.flake8 extension.
2023-10-11 09:16:39.140 [error] Please install the extension from: https://marketplace.visualstudio.com/items?itemName=ms-python.flake8
2023-10-11 09:16:39.140 [error] If the error is due to missing flake8, please install flake8 using pip manually.
2023-10-11 09:16:39.140 [error] Learn more here: https://aka.ms/AAlgvkb
2023-10-11 09:16:39.140 [info] Linting with flake8 failed.
2023-10-11 09:16:39.140 [info] Error: Module 'flake8' not installed.

My python extension version is v2023.18.0. I dont have the vscode flake8 extension installed.

@karthiknadig
Copy link
Member

Are you using a devcontainer by chance? It seems like all linters are enabled in the devcontainer's settings.json

@shapiromatron
Copy link

No, no containers for me.

@ssbarnea
Copy link

I can confirm the bug with latest versions. Setting "python.linting.flake8Enabled": false does not have an effect and there is nothing we can do to address prevent the error.

@adrn
Copy link

adrn commented Oct 16, 2023

I'm seeing the same issue FWIW!

@jodahoney
Copy link

Also experiencing the same error.

@karthiknadig
Copy link
Member

This is now addressed in pre-release

@buhrmann
Copy link

Does this mean I'm also not going to get the There was an error in running the linter 'flake8' error all the time? I'm not using flake8, it's not installed, it's not in any VS Code setting, nor in any python configuration files, but the Python extension is still trying to run it. Seems like it's hard-coded to run always currently?

@dhimmel
Copy link

dhimmel commented Oct 25, 2023

This is now addressed in pre-release

Nice. Don't see any linked commits. Is it c3afea5 that provides the fix?

@karthiknadig
Copy link
Member

This is the commit 5d7eb65

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

9 participants