Skip to content

Commit f4747b7

Browse files
authored
Merge branch 'main' into fix/virtual_documents_dir
2 parents 26148d2 + 254359e commit f4747b7

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "python-lsp-ruff"
77
authors = [
88
{name = "Julian Hossbach", email = "julian.hossbach@gmx.de"}
99
]
10-
version = "2.3.1"
10+
version = "2.3.2"
1111
description = "Ruff linting plugin for pylsp"
1212
readme = "README.md"
1313
requires-python = ">=3.8"

tests/test_ruff_lint.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,13 @@ def get_ruff_settings(workspace, doc, config_str):
141141

142142
def test_ruff_settings(workspace):
143143
config_str = r"""[tool.ruff]
144+
select = ["E402", "F401", "F841"]
144145
ignore = ["F841"]
145146
exclude = [
146147
"blah/__init__.py",
147148
"file_2.py"
148149
]
149-
extend-select = ["D"]
150+
extend-select = ["D103", "D104"]
150151
[tool.ruff.per-file-ignores]
151152
"test_something.py" = ["F401"]
152153
"""
@@ -290,6 +291,11 @@ def test_ruff_lint_strips_virtual_documents_path(notebook_workspace):
290291

291292

292293
def test_notebook_input(workspace):
294+
# Explicitly enable the rules we're expecting to find.
295+
workspace._config.update(
296+
{"plugins": {"ruff": {"select": ["E402", "F401", "F841"]}}}
297+
)
298+
293299
doc_str = r"""
294300
print('hi')
295301
import os

0 commit comments

Comments
 (0)