Skip to content

Commit 52a0d54

Browse files
authored
Use shlex.split() to split pylint flags (#338)
1 parent 2580db3 commit 52a0d54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: pylsp/plugins/pylint_lint.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import re
1010
from subprocess import Popen, PIPE
1111
import os
12+
import shlex
1213

1314
from pylsp import hookimpl, lsp
1415

@@ -91,7 +92,7 @@ def lint(cls, document, is_saved, flags=''):
9192
'-f',
9293
'json',
9394
document.path
94-
] + (str(flags).split(' ') if flags else [])
95+
] + (shlex.split(str(flags)) if flags else [])
9596
log.debug("Calling pylint with '%s'", ' '.join(cmd))
9697

9798
with Popen(cmd, stdout=PIPE, stderr=PIPE,

0 commit comments

Comments
 (0)