From 77ef5e6aeb7c3ed584c170aa99b8425eb675e084 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 22 Dec 2016 16:35:50 -0600 Subject: [PATCH 1/2] fix incomplete extra args setting --- Pylinter.sublime-settings | 4 +++- pylinter.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Pylinter.sublime-settings b/Pylinter.sublime-settings index 52c3c05..5af6397 100755 --- a/Pylinter.sublime-settings +++ b/Pylinter.sublime-settings @@ -31,5 +31,7 @@ "ignore": [], // a list of strings of individual errors to disable, ex: ["C0301"] "disable": [], - "plugins": [] + "plugins": [], + // extra arguments to pass pylint, ex: "--extension-pkg-whitelist=lxml" + "pylint_extra": null } diff --git a/pylinter.py b/pylinter.py index 6f3f23e..e40febc 100755 --- a/pylinter.py +++ b/pylinter.py @@ -478,6 +478,9 @@ def run(self): if self.disable_msgs: options.append('--disable=%s' % self.disable_msgs) + if self.extra_pylint_args: + options.append(self.extra_pylint_args) + options.append(self.file_name) command.extend(options) From 67c5dce42ad86f45bfe08dd81ee6e96aea93ebf8 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 17 Jan 2017 16:24:23 -0600 Subject: [PATCH 2/2] update extra_pylint_args setting for list input --- Pylinter.sublime-settings | 4 ++-- pylinter.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Pylinter.sublime-settings b/Pylinter.sublime-settings index 5af6397..809b580 100755 --- a/Pylinter.sublime-settings +++ b/Pylinter.sublime-settings @@ -32,6 +32,6 @@ // a list of strings of individual errors to disable, ex: ["C0301"] "disable": [], "plugins": [], - // extra arguments to pass pylint, ex: "--extension-pkg-whitelist=lxml" - "pylint_extra": null + // extra arguments to pass pylint, ex: ["--extension-pkg-whitelist=lxml"] + "pylint_extra": [] } diff --git a/pylinter.py b/pylinter.py index e40febc..ca8fe20 100755 --- a/pylinter.py +++ b/pylinter.py @@ -143,7 +143,7 @@ def read_settings(cls): plugins = cls.get_or('plugins', None) # Add custom runtime settings - pylint_extra = PylSet.get_or('pylint_extra', None) + pylint_extra = cls.get_or('pylint_extra', None) disable = cls.get_or('disable', []) # Added ignore for trailing whitespace (false positives bug in @@ -479,7 +479,8 @@ def run(self): options.append('--disable=%s' % self.disable_msgs) if self.extra_pylint_args: - options.append(self.extra_pylint_args) + for extra_arg in self.extra_pylint_args: + options.append(extra_arg) options.append(self.file_name) command.extend(options)