question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

linting does not work!

See original GitHub issue

Environment data

  • VS Code version: 1.41.1
  • Extension version (available under the Extensions sidebar): Python(2020.1.57204)
  • OS and version: Ubuntu 18.04
  • Python version (& distribution if applicable, e.g. Anaconda): Aanconda python 3.7.4
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info #3977): Jedi

setting

{
    "editor.fontSize": 16,
    "editor.largeFileOptimizations": false,
    "terminal.integrated.inheritEnv": false,
    "workbench.iconTheme": "material-icon-theme",
    "files.autoSave": "afterDelay",
    "window.zoomLevel": 0,
    "debug.console.fontSize": 16,
    "terminal.integrated.fontSize": 16,
    "[cpp]": {
        "editor.defaultFormatter": "ms-vscode.cpptools"
    },
    "cmake.configureOnOpen": true,
    "C_Cpp.default.cppStandard": "c++11",
    "cmake.parallelJobs": 8,
    "workbench.sideBar.location": "left",
    "css.completion.completePropertyWithSemicolon": false,
    "workbench.statusBar.visible": true,
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "C_Cpp.updateChannel": "Insiders",
    "C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 0}",
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
    "python.formatting.provider": "yapf",
    "python.linting.flake8Enabled": true,
    "python.linting.pylintEnabled": false,
    "python.linting.flake8Args": [
        "--max-line-length=120",
        // "--ignore=E402,F401,E266"
    ],
    "python.formatting.yapfArgs": [
        "-p",
        "--style",
        "{ based_on_style: google, indent_width:4 , column_limit:100}"
    ],
    "python.dataScience.notebookFileRoot": "${fileDirname}",
    "python.jediMemoryLimit": -1,
}

Expected behaviour

Screenshot from 2020-01-10 12-16-46

Actual behaviour

Screenshot from 2020-01-10 12-15-04

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

> conda info --json
> conda run -n base python -m yapf -p --style "{ based_on_style: google, indent_width:4 , column_limit:100}" --diff ~/prj/helloworld/main.py
cwd: ~/prj/helloworld
> conda run -n base python -m yapf -p --style "{ based_on_style: google, indent_width:4 , column_limit:100}" --diff ~/prj/helloworld/main.py
cwd: ~/prj/helloworld
> conda run -n base python -m flake8 --max-line-length=120 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/prj/helloworld/main.py
cwd: ~/prj/helloworld
> conda run -n base python -m flake8 --max-line-length=120 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/prj/helloworld/main.py
cwd: ~/prj/helloworld
##########Linting Output - flake8##########

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
nvm1commented, Jan 10, 2020

had the same problem after upgrading to the latest release. Had to downgrade to https://github.com/microsoft/vscode-python/releases/tag/2019.11.50794 to get flake8 back to work

VS Code version: 1.41.1 (UserSetup) Extension version (available under the Extensions sidebar): Python(2020.1.57204) OS and version: Windows 10 Pro Python version (& distribution if applicable, e.g. Anaconda): Aanconda python 3.7.6 Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda Jedi or Language Server? (i.e. what is “python.jediEnabled” set to; more info #3977): Jedi

2reactions
ghostcommented, Jan 12, 2020

Have the same issue, with latest version (2020.1.57204) flake8 linting doesn’t work. pylint works but is very slow (not sure if was always slow because I use flake8).

I use pylint. It is not working for latest version either.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linting Python in Visual Studio Code
The linter has not been installed in the current Python environment. Open a command prompt, navigate to the location where your selecter interpreter...
Read more >
Linting in Visual Studio Code not working - Stack Overflow
I have re-installed the Python extension and then re-installed Visual Studio Code, nothing worked. Can anyone help me? I run MacOS 10.13.1, ...
Read more >
Pylint does not work. · Issue #12285 · microsoft/vscode-python
Pylint is not installed. Open folder in VSC; Add file test.py (and typed incorrect code to check linter works); Ctrl + Shift +...
Read more >
ESLint not working in VSCode? Help build a troubleshooting ...
Open the command palette by pressing Ctrl / Cmd + Shift + P and select 'ESLint: Show Output Channel '. If ESLint throws...
Read more >
Python: Run Linting does not do anything : r/vscode - Reddit
Hi, When I open the command palette to do Python: Run Linting, vscode doesn't seem to execute anything. I am not sure why,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found