8000 Update deprecated e999 check (#93) · python-lsp/python-lsp-ruff@0a07aa7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a07aa7

Browse files
authored
Update deprecated e999 check (#93)
* add check for "None" for syntax error severity
1 parent 34acd6e commit 0a07aa7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
repos:
22
- repo: https://github.com/pre-commit/mirrors-mypy
3-
rev: v0.991
3+
rev: v1.10.1
44
hooks:
55
- id: mypy
66
args: [--ignore-missing-imports]
77

88
- repo: https://github.com/charliermarsh/ruff-pre-commit
9-
rev: v0.2.1
9+
rev: v0.5.2
1010
hooks:
1111
# Run the linter.
1212
- id: ruff

pylsp_ruff/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def create_diagnostic(check: RuffCheck, settings: PluginSettings) -> Diagnostic:
210210
# Ruff intends to implement severity codes in the future,
211211
# see https://github.com/charliermarsh/ruff/issues/645.
212212
severity = DiagnosticSeverity.Warning
213-
if check.code == "E999" or check.code[0] == "F":
213+
if check.code == "None" or check.code == "E999" or check.code[0] == "F":
214214
severity = DiagnosticSeverity.Error
215215

216216
# Check if check.code starts contained in given severities

0 commit comments

Comments
 (0)
0