@@ -239,7 +239,7 @@ def pylsp_lint(
239
239
# dmypy exists on path
240
240
# -> use mypy on path
241
241
completed_process = subprocess .run (
242
- ["dmypy" , * apply_overrides ( args , overrides ) ], stderr = subprocess .PIPE , ** windows_flag
242
+ ["dmypy" , "status" ], stderr = subprocess .PIPE , ** windows_flag
243
243
)
244
244
errors = completed_process .stderr .decode ()
245
245
exit_status = completed_process .returncode
@@ -250,6 +250,7 @@ def pylsp_lint(
250
250
errors .strip (),
251
251
)
252
252
subprocess .run (["dmypy" , "kill" ], ** windows_flag )
253
+ subprocess .run (["dmypy" , "start" ], ** windows_flag )
253
254
else :
254
255
# dmypy does not exist on path, but must exist in the env pylsp-mypy is installed in
255
256
# -> use dmypy via api
@@ -261,9 +262,10 @@ def pylsp_lint(
261
262
errors .strip (),
262
263
)
263
264
mypy_api .run_dmypy (["kill" ])
265
+ mypy_api .run_dmypy (["start" ])
264
266
265
- # run to use existing daemon or restart if required
266
- args = ["run " , "--" ] + apply_overrides (args , overrides )
267
+ # use existing daemon
268
+ args = ["check " , "--" ] + apply_overrides (args , overrides )
267
269
268
270
if shutil .which ("dmypy" ):
269
271
# dmypy exists on path
0 commit comments