From c86ded8d6aa157c9948ff433294bb177997f7bca Mon Sep 17 00:00:00 2001 From: hfrentzel Date: Mon, 16 Jan 2023 20:36:26 -0600 Subject: [PATCH] Use shlex.split() to split pylint flags --- pylsp/plugins/pylint_lint.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pylsp/plugins/pylint_lint.py b/pylsp/plugins/pylint_lint.py index 70a086cd..76e990c5 100644 --- a/pylsp/plugins/pylint_lint.py +++ b/pylsp/plugins/pylint_lint.py @@ -9,6 +9,7 @@ import re from subprocess import Popen, PIPE import os +import shlex from pylsp import hookimpl, lsp @@ -91,7 +92,7 @@ def lint(cls, document, is_saved, flags=''): '-f', 'json', document.path - ] + (str(flags).split(' ') if flags else []) + ] + (shlex.split(str(flags)) if flags else []) log.debug("Calling pylint with '%s'", ' '.join(cmd)) with Popen(cmd, stdout=PIPE, stderr=PIPE,