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.

No flake8 linting shown

See original GitHub issue

Hello,

The linting messages from flake8 are not shown, only pyright messages are displayed.

Flake8 is found and executed, output of CocCommand workspace.showOutput coc-pyright-linting:

########## active linter: flake8
########## Linting Output - flake8##########
/path/file.py:22:1: D205 1 blank line required between summary line and description
/path/file.py:22:1: D212 Multi-line docstring summary should start at the first line

Output of CocCommand workspace.showOutput Pyright:

[Info  - 7:23:32 AM] Pyright language server 1.1.113 starting
[Info  - 7:23:32 AM] Server root directory: /home/AntoineD/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/
[Info  - 7:23:32 AM] Loading configuration file at /path/pyrightconfig.json
[Info  - 7:23:32 AM] Assuming Python version 3.8
[Info  - 7:23:32 AM] Assuming Python platform Linux
[Info  - 7:23:32 AM] No include entries specified; assuming /path
[Info  - 7:23:32 AM] Auto-excluding **/node_modules
[Info  - 7:23:32 AM] Auto-excluding **/__pycache__
[Info  - 7:23:32 AM] Auto-excluding .git
[Error  - 7:23:32 AM] stubPath /path/typings is not a valid directory.
[Info  - 7:23:32 AM] Searching for source files
[Info  - 7:23:32 AM] Auto-excluding /path/.tox/.tox
[Info  - 7:23:32 AM] Auto-excluding /path/.tox/anaconda-package
[Info  - 7:23:33 AM] Auto-excluding /path/.tox/conda-build
[Info  - 7:23:35 AM] Found 74237 source files
[Info  - 7:23:38 AM] [FG] Long operation: checking: /path/file.py (2567ms)
[Info  - 7:23:38 AM] [FG] Long operation: analyzing: /path/file.py (2752ms)

Contents of pyrightconfig.json :

{
    "venvPath": ".tox",
    "venv": "dev"
}

Contents of .vim/coc-settings.json:

{
  "python.linting.enabled": true,
  "python.linting.flake8Enabled": true,
  "python.linting.flake8Path": ".tox/dev/bin/flake8"
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
AntoineDcommented, Feb 22, 2021

I just found this is due to the flake8-colors plugin, though the issue does not happen when flake8 is run from the command line.

0reactions
AntoineDcommented, Feb 22, 2021

Hi @yaegassy,

thanks for helping!

There’s no python.linting.flake8Args setting in my local coc-settings.json (see my first message) and the global one is empty. My flake8 settings are only in setup.cfg.

If I add the format settings to the setup.cfg then I get the expected output from the command line:

flake8 /path/file.py
22,1,D,D205:1 blank line required between summary line and description
22,1,D,D212:Multi-line docstring summary should start at the first line

But still the output of CocCommand workspace.showOutput coc-pyright-linting:

########## active linter: flake8
########## Linting Output - flake8##########
/path/file.py:22:1: D205 1 blank line required between summary line and description
/path/file.py:22:1: D212 Multi-line docstring summary should start at the first line
Read more comments on GitHub >

github_iconTop Results From Across the Web

flake8 linting does not show up in problems tab or inside ...
Mypy linting works, pylint linting works, and flake8 actually is called and works, only nothing shows up in the editor. settings.json conf:
Read more >
Python 3 linter does not work (pylint, flake8) #482 - GitHub
Expected behavior. Should show errors / warnings. Steps to reproduce: mkdir -p Project/python; mkdir -p Project/javascript; touch ...
Read more >
Ignoring Errors with Flake8 — flake8 3.1.1 documentation
This tells Flake8 to ignore any error codes starting with E1 , E23 , or W503 while it is running. Note. The documentation...
Read more >
Python Flake8 Lint - Package Control
Python Flake8 Lint is a Sublime Text 2/3 plugin for check Python files ... or "theme-simple" to show icon marks // - ""...
Read more >
Flake8 | Dev Cheatsheets - Michael Currin
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics ... of by using an IDE to format the code and not using any deprecated code patterns....
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