flake8 process is causing very high CPU ussage
See original GitHub issueEnvironment data
- VS Code version: 1.41.1
- Extension version (available under the Extensions sidebar): 2020.1.58038
- OS and version: macOS 10.14.4
- Python version (& distribution if applicable, e.g. Anaconda): 3.5.6
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): venv
- Relevant/affected Python packages and their versions:
- flake8==3.7.9
- flake8-bugbear==20.1.3
- flake8-docstrings==1.5.0
- flake8-isort==2.8.0
- flake8-mypy==17.8.0
- flake8-rst-docstrings==0.0.13
- pyflakes==2.1.1
- Jedi or Language Server? (i.e. what is
"python.jediEnabled"
set to; more info #3977): Jedi
Expected behaviour
Linting will not cause CPU usage to spike
Actual behaviour
Process python -m flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s
from VS code is using showing 100% CPU usage.
I see that this user was having the same issues, but created an issue in the wrong repo https://github.com/microsoft/vscode/issues/88351
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
Currently opening any Python file causes this to occur. Closing the python files will not terminate the process. Only closing VS code will.
In settings "python.linting.flake8Enabled": true,
.
The following is the used .flake8
file
[flake8]
ignore = E203, E266, E501, W503
max-line-length = 80
max-complexity = 18
docstring-convention = numpy
select = B,C,E,F,W,B9,D,RST
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
[Info] Looking for git repository
[Info] Git repository found, initializing review manager and pr tree view.
[Info] Review> Validate state in progress
[Info] Review> Validating state...
[Info] No remote with name 'upstream' found. Please update your 'githubPullRequests.remotes' setting.
[Info] No remote with name 'upstream' found. Please update your 'githubPullRequests.remotes' setting.
[Info] Found GitHub remote
[Info] Found GitHub remote
[Info] Review> Queuing additional validate state
[Info] Review> no matching pull request metadata found for current branch plotting-stypes
[Info] Review> Validating state...
[Info] No remote with name 'upstream' found. Please update your 'githubPullRequests.remotes' setting.
[Info] Found GitHub remote
[Info] Review> no matching pull request metadata found for current branch plotting-stypes
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging
)
[Extension Host] Info Python Extension: 2020-01-31 09:43:27: > ~/Documents/pyfrb_projects/pyfrb/pyfrb_env/bin/python -m flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/Documents/pyfrb_projects/pyfrb/pyfrb/__init__.py
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Thanks for the suggestion! We talked about it with the team and we have unfortunately decided we will not be moving forward with this idea. We think there isn’t an enough widespread need for this to warrant the maintenance cost for the feature.
The behavior you want sound reasonable. 😄 We consider it a feature request and will look at how well the change fits in to our plans. Thanks!