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.

Support the "Info" category for flake8

See original GitHub issue

Environment data

  • VS Code version: 1.22.2
  • Extension version: 2018.3.1
  • OS and version: Ubuntu 17.10
  • Python version: 3.6
  • Type of virtual environment used: N/A
  • Relevant/affected Python packages and their versions: flake8==3.5.0 flake8-import-order==0.17.1

Actual behavior

Flake8 plugin configuration settings don’t match the settings schema in vscode, even though the settings do work.

Expected behavior

Flake8 plugin settings are not marked as unknown in the vscode settings file.

Steps to reproduce:

  1. Install flake8

  2. Install flake8-import-order

  3. Open a file with the following contents:

    from foo import bar
    
    import sys
    
  4. Notice how this triggers an info level problem

  5. Add this line to your vscode settings:

      "python.linting.flake8CategorySeverity.I": "Warning",
    
  6. Notice this gives a warning in the settings file

  7. Save or reopen the Python file

  8. Notice that the severity level has changed from info to warning

Logs

N/A

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
karthiknadigcommented, Aug 30, 2022

Please try the flake8 extension, currently in pre-release. We are looking for feedback on it, please create issues on github for the extension: https://marketplace.visualstudio.com/items?itemName=ms-python.flake8 . This will be the eventual successor for the flake8 linting support in the extension.

One of the things you can do there is customize the severity, by individual error codes or categories.

1reaction
MetRonniecommented, Jun 21, 2021

This ought to work if the flake8 plugin uses more than 1 letter for the prefix, e.g. flake8-simplify uses SIM, but

"python.linting.flake8CategorySeverity.SIM": "Warning",

does not work (you have to use .S instead)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release 6.0.0 Ian Stapleton Cordasco - Flake8
How to make Flake8 provide your check plugin with information (via command-line flags, function/class pa- rameters, etc.) • How to make a formatter...
Read more >
flake8-annotations - PyPI
flake8 -annotations is a plugin for Flake8 that detects the absence of PEP 3107-style function annotations and PEP 484-style type comments (see: Caveats)....
Read more >
Why is `default` a flake8 error in this python class?
0, they've just changed the versions because that's what they intend to support. If I install pycodestyle 2.3.1 and flake8 3.5.0 (and pyflakes ......
Read more >
Linting | Python in Visual Studio Code
Pylint (this is the default linter used); Pep8; Flake8; mypy ... Visual Studio Code supports the following categories in linting: Hint, Error, Information, ......
Read more >
Coding style - Django documentation
These hooks help to identify simple issues before committing code for review. ... Use flake8 to check for problems in this area.
Read more >

github_iconTop Related Medium Post

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