summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2018-05-17 05:52:43 -0400
committerClaudiu Popa <pcmanticore@gmail.com>2018-05-17 05:52:55 -0400
commit25d9a35e5ac6f231dbd6a1d24e35f51c70b744de (patch)
tree76311dac57e2bbae9f3d11036489f043c1424174
parent009ba1d605d1a8dcb091dfbba21041a02218641a (diff)
downloadpylint-git-25d9a35e5ac6f231dbd6a1d24e35f51c70b744de.tar.gz
Use partition to not get a ValueError. Close #2112
-rw-r--r--pylint/checkers/format.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pylint/checkers/format.py b/pylint/checkers/format.py
index 71e82ad39..b16a91a8a 100644
--- a/pylint/checkers/format.py
+++ b/pylint/checkers/format.py
@@ -1015,7 +1015,7 @@ class FormatChecker(BaseTokenChecker):
line = stripped_line
mobj = OPTION_RGX.search(line)
if mobj and '=' in line:
- front_of_equal, back_of_equal = mobj.group(1).split('=', 1)
+ front_of_equal, _, back_of_equal = mobj.group(1).partition('=')
if front_of_equal.strip() == 'disable':
if 'line-too-long' in [_msg_id.strip() for _msg_id in back_of_equal.split(',')]:
return None