Skip to content

Commit

Permalink
Update deprecated e999 check (#93)
Browse files Browse the repository at this point in the history
* add check for "None" for syntax error severity
  • Loading branch information
jhossbach authored Jul 16, 2024
1 parent 34acd6e commit 0a07aa7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.10.1
hooks:
- id: mypy
args: [--ignore-missing-imports]

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.2.1
rev: v0.5.2
hooks:
# Run the linter.
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion pylsp_ruff/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def create_diagnostic(check: RuffCheck, settings: PluginSettings) -> Diagnostic:
# Ruff intends to implement severity codes in the future,
# see https://github.com/charliermarsh/ruff/issues/645.
severity = DiagnosticSeverity.Warning
if check.code == "E999" or check.code[0] == "F":
if check.code == "None" or check.code == "E999" or check.code[0] == "F":
severity = DiagnosticSeverity.Error

# Check if check.code starts contained in given severities
Expand Down

0 comments on commit 0a07aa7

Please sign in to comment.