Skip to content

Commit

Permalink
Report Flake8 errors with Error severity level
Browse files Browse the repository at this point in the history
Error codes from Flake8 :
  - Fxxx : checks from PyFlakes => Error severity level
  - E999 : code for invalid AST => Error severity level
  - Exxx : checks from pydocstyle (syntax checks for PEP-8) => Warning
    severity level
  - Wxxx : checks from pydocstyle (syntax checks for PEP-8) => Warning
    severity level

Closes python-lsp#230
Fix PR python-lsp#223
  • Loading branch information
lcheylus committed Jun 30, 2022
1 parent 50841c1 commit 2e9f230
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pylsp/plugins/flake8_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def parse_stdout(document, stdout):
# show also the code in message
msg = code + ' ' + msg
severity = lsp.DiagnosticSeverity.Warning
if code[0] == "E":
if code == "E999" or code[0] == "F":
severity = lsp.DiagnosticSeverity.Error
diagnostics.append(
{
Expand Down

0 comments on commit 2e9f230

Please sign in to comment.