@@ -77,12 +77,15 @@ def test_ruff_config_param(workspace):
7777 mock_instance = popen_mock .return_value
7878 mock_instance .communicate .return_value = [bytes (), bytes ()]
7979 ruff_conf = "/tmp/pyproject.toml"
80- workspace ._config .update ({"plugins" : {"ruff" : {"config" : ruff_conf }}})
80+ workspace ._config .update (
81+ {"plugins" : {"ruff" : {"config" : ruff_conf , "extendSelect" : ["D" , "F" ]}}}
82+ )
8183 _name , doc = temp_document (DOC , workspace )
8284 ruff_lint .pylsp_lint (workspace , doc )
8385 (call_args ,) = popen_mock .call_args [0 ]
8486 assert "ruff" in call_args
8587 assert f"--config={ ruff_conf } " in call_args
88+ assert "--extend-select=D,F" in call_args
8689
8790
8891def test_ruff_executable_param (workspace ):
@@ -122,6 +125,7 @@ def test_ruff_config(workspace):
122125 "blah/__init__.py",
123126 "file_2.py"
124127]
128+ extend-select = ["D"]
125129[tool.ruff.per-file-ignores]
126130"test_something.py" = ["F401"]
127131"""
@@ -172,8 +176,10 @@ def f():
172176 _list = []
173177 for diag in diags :
174178 _list .append (diag ["code" ])
175- # Assert that ignore is working as intended
179+ # Assert that ignore and extend-select is working as intended
176180 assert "E402" in _list
181+ assert "D103" in _list
182+ assert "D104" in _list
177183 assert "F841" not in _list
178184
179185 # Excludes
0 commit comments