Skip to content
Snippets Groups Projects
Commit add610ce authored by hippo91's avatar hippo91 Committed by Claudiu Popa
Browse files

Add of a test on the presence of = in the line. Return None instead of Return...

Add of a test on the presence of = in the line. Return None instead of Return to avoid inconsistent return statement
parent 908c2997
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -1000,11 +1000,11 @@ class FormatChecker(BaseTokenChecker):
# Don't count excess whitespace in the line length.
line = stripped_line
mobj = OPTION_RGX.search(line)
if mobj:
if mobj and '=' in line:
front_of_equal, back_of_equal = mobj.group(1).split('=', 1)
if front_of_equal.strip() == 'disable':
if 'line-too-long' in [_msg_id.strip() for _msg_id in back_of_equal.split(',')]:
return
return None
line = line.rsplit('#', 1)[0].rstrip()
 
if len(line) > max_chars and not ignore_long_line.search(line):
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment