From b61e890a0ca8e54845a39d2b53ee43316331a375 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 8 May 2019 10:18:50 -0700 Subject: [PATCH] Remove unnecessary "," from Pylint version regex MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: See PHI1238. This "," in the regex can only make the lint binding fail if there is no "," in the version output string. In modern versions of Pylint, there is (apparently) no comma in the version string. Remove it. See also Test Plan: ``` $ pip install pylint Traceback (most recent call last): File "/Users/epriestley/Library/Python/2.7/bin/pip", line 6, in from pip._internal import main ImportError: No module named pip._internal ``` ¯\_(ツ)_/¯ Reviewers: amckinley, joshuaspence Reviewed By: joshuaspence Differential Revision: https://secure.phabricator.com/D20505 --- src/lint/linter/ArcanistPyLintLinter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lint/linter/ArcanistPyLintLinter.php b/src/lint/linter/ArcanistPyLintLinter.php index 44793a50..f8cc279a 100644 --- a/src/lint/linter/ArcanistPyLintLinter.php +++ b/src/lint/linter/ArcanistPyLintLinter.php @@ -38,7 +38,7 @@ final class ArcanistPyLintLinter extends ArcanistExternalLinter { list($stdout) = execx('%C --version', $this->getExecutableCommand()); $matches = array(); - $regex = '/^pylint (?P\d+\.\d+\.\d+),/'; + $regex = '/^pylint (?P\d+\.\d+\.\d+)/'; if (preg_match($regex, $stdout, $matches)) { return $matches['version']; } else {