-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Linting more than just my code in an infinite loop #18759
Comments
It seems to be using |
Oh good catch, I had forgotten about that. I've recreated the venv, it now says:
If the problem doesn't come up in the next few days I think we can say that that was to blame. I'll report back when I know. |
@MatrixManAtYrService Can you look at the problems window and see if the problem is reported via flake8 or pylance? |
It looks like its flake8. I took a screenshot: I was hoping to just lint my code, but it looks like it's going on quite a spree. I don't really need to lint these files, as I'm not editing them:
I have a git repo rooted in my home directory (with a very aggressive .gitignore, I use it to sync files between machines). Maybe something is looking for the "repo root" and instead of stopping at the project folder it's going all the way up to my home directory? That would explain why it's got a too-wide scope. I'll rename |
@MatrixManAtYrService Can you try this prototype extension to see if this helps with your issue? PyCQA/flake8#1467 (comment) That is a new direction we are beginning to take with linting. We recently published pre-release version of that extension for pylint. That extension run the linter as a server and works with it over Language Server Protocol. IT should behave better in scenarios like this. |
Ok. Based on the settings description when I installed the extension, I also made these changes to my settings: // "python.linting.flake8Enabled": true,
// "python.linting.flake8Args": [
// "--max-line-length=120",
// "--ignore=E402,E302,E305,E266,W503,E127,E241,E128,E201,E203,E202,F811,E501"
// ],
// "python.linting.flake8Path": "/usr/local/bin/flake8",
"python.flake8Args": [
"--max-line-length=120",
"--ignore=E402,E302,E305,E266,W503,E127,E241,E128,E201,E203,E202,F811,E501"
],
"python.flake8Path": [
"/usr/local/bin/flake8"
], It appears to be working, but I can't be sure that anything meaningful has changed without giving it some time. I'll use it for a while and report back. Thank you for your help. |
It happened to me again while using the recommended extension 😦 |
@MatrixManAtYrService Can you copy the Output from Output> Flake8? |
At this moment it shows:
It's not doing the annoying thing right now though. I'll try to catch it next time it does the thing too. |
@MatrixManAtYrService Would it be possible for you to share the list of extensions you have installed? you can find them under |
Sure:
|
@MatrixManAtYrService So, something is triggering the Also, it looks like you might have stale copies of several extension. Would it be possible for you to delete the stale ones and reload VS Code? |
I assume that "stale" here means the ones with the older version numbers. I've deleted them, so here's the slightly smaller list:
I'll leave that output window open while I code and see if I notice any correlation between my activities and those open events. Thanks for your help with this. |
I haven't had the stuck-in-loop thing happen since I deleted the stale plugins, and for the most part my
Even though I haven't opened that file |
@MatrixManAtYrService If you run into this issue again, i recommend disabling linting on the python extension and try the |
Issue Type: Bug
Behaviour
Expected vs. Actual
If I'm not making any changes, I don't expect
flake8
to run over and over. And usually, that's the case. But every now and then the processor shoots to 100and the "problems" indicator starts counting up from zero over and over again, whether or not I'm making any changes. Restarting VSCode fixes it for a little while
I know it's running linting because while it's happening
3-Python.log
shows:over and over. I'm not sure why this would show up in my
Electron
process though, so I'm thinking that whatever is stuck in an infinite loop, it includes more than just linting.Steps to reproduce:
I don't know, it seems to happen randomly. Usually once per half-hour or so, but occasionally I'll get away with coding for days before it happens.
Diagnostic data
python.languageServer
setting: DefaultUser Settings
Extension version: 2022.2.1924087327
VS Code version: Code 1.65.2 (Universal) (c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1, 2022-03-10T14:33:49.188Z)
OS version: Darwin x64 20.6.0
Restricted Mode: No
System Info
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: