Skip to content

Commit b8a7055

Browse files
betaboonjhossbach
authored andcommitted
refactor: move plugin code into plugin.py
1 parent cc61c36 commit b8a7055

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed
File renamed without changes.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies = [
2121
dev = ["pytest", "pre-commit"]
2222

2323
[project.entry-points.pylsp]
24-
ruff = "pylsp_ruff.ruff_lint"
24+
ruff = "pylsp_ruff.plugin"
2525

2626
[project.urls]
2727
"Homepage" = "https://github.com/python-lsp/python-lsp-ruff"

tests/test_ruff_lint.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from pylsp.config.config import Config
1111
from pylsp.workspace import Document, Workspace
1212

13-
import pylsp_ruff.ruff_lint as ruff_lint
13+
import pylsp_ruff.plugin as ruff_lint
1414

1515
DOC_URI = uris.from_fs_path(__file__)
1616
DOC = r"""import pylsp
@@ -73,7 +73,7 @@ def test_ruff_lint(workspace):
7373

7474

7575
def test_ruff_config_param(workspace):
76-
with patch("pylsp_ruff.ruff_lint.Popen") as popen_mock:
76+
with patch("pylsp_ruff.plugin.Popen") as popen_mock:
7777
mock_instance = popen_mock.return_value
7878
mock_instance.communicate.return_value = [bytes(), bytes()]
7979
ruff_conf = "/tmp/pyproject.toml"
@@ -98,7 +98,7 @@ def test_ruff_config_param(workspace):
9898

9999

100100
def test_ruff_executable_param(workspace):
101-
with patch("pylsp_ruff.ruff_lint.Popen") as popen_mock:
101+
with patch("pylsp_ruff.plugin.Popen") as popen_mock:
102102
mock_instance = popen_mock.return_value
103103
mock_instance.communicate.return_value = [bytes(), bytes()]
104104

@@ -160,7 +160,7 @@ def f():
160160
continue
161161
assert value is None
162162

163-
with patch("pylsp_ruff.ruff_lint.Popen") as popen_mock:
163+
with patch("pylsp_ruff.plugin.Popen") as popen_mock:
164164
mock_instance = popen_mock.return_value
165165
mock_instance.communicate.return_value = [bytes(), bytes()]
166166

0 commit comments

Comments
 (0)