Skip to content

Commit 1c5a336

Browse files
authored
Merge pull request #45 from tyoung-patreon/dmypy-fixes
Use status and restart for dmypy
2 parents 67209ba + 8b70857 commit 1c5a336

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pylsp_mypy/plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def pylsp_lint(
239239
# dmypy exists on path
240240
# -> use mypy on path
241241
completed_process = subprocess.run(
242-
["dmypy", *apply_overrides(args, overrides)], stderr=subprocess.PIPE, **windows_flag
242+
["dmypy", "status"], stderr=subprocess.PIPE, **windows_flag
243243
)
244244
errors = completed_process.stderr.decode()
245245
exit_status = completed_process.returncode
@@ -249,7 +249,7 @@ def pylsp_lint(
249249
exit_status,
250250
errors.strip(),
251251
)
252-
subprocess.run(["dmypy", "kill"], **windows_flag)
252+
subprocess.run(["dmypy", "restart"], **windows_flag)
253253
else:
254254
# dmypy does not exist on path, but must exist in the env pylsp-mypy is installed in
255255
# -> use dmypy via api
@@ -260,7 +260,7 @@ def pylsp_lint(
260260
exit_status,
261261
errors.strip(),
262262
)
263-
mypy_api.run_dmypy(["kill"])
263+
mypy_api.run_dmypy(["restart"])
264264

265265
# run to use existing daemon or restart if required
266266
args = ["run", "--"] + apply_overrides(args, overrides)

0 commit comments

Comments
 (0)