Skip to content
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

Refine diagnostic severity for flake8 #490

Merged
merged 2 commits into from Dec 18, 2023
Merged

Refine diagnostic severity for flake8 #490

merged 2 commits into from Dec 18, 2023

Commits on Nov 20, 2023

  1. Refine diagnostic severity for flake8

    Previously all diagnostics that starts with "F" (generated from pyflakes)
    are reported as errors, which could be too high. As such, in this commit
    we change to report only certain pyflakes diagnostics as errors and all
    the others as warnings. The current list of error codes is in sync with
    the `pyflakes_lint` plugin.
    
    While it is possible to generate such a list (or more precisely, a `set`)
    during runtime (see the snippet in the comment), that might be less ideal
    because:
    
      - Flake8 does not guarantee a stable API.
      - We run `flake8` as an executable and parse its outputs, so using the
        `flake8` module in Python may bring inconsistency (e.g., the user
        install Flake8 in a different virtual environment from pylsp).
      - Doing so couples two plugins (flake8 and pyflakes) together.
    
    So it seems better to maintain such a list of error codes manually.
    
    Fix #256.
    pengjiz committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    2fe41e2 View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2023

  1. Configuration menu
    Copy the full SHA
    93d2f26 View commit details
    Browse the repository at this point in the history