Raise max length error over 120 chars not at 120 chars. python/tidy.py

This commit is contained in:
Mathieu Rheaume 2015-09-20 19:59:39 -04:00
parent 566f1eb6f6
commit 705d8f7a1c

View file

@ -76,7 +76,7 @@ def check_length(file_name, idx, line):
if file_name.endswith(".lock"):
raise StopIteration
max_length = 120
if len(line) >= max_length:
if len(line.rstrip('\n')) > max_length:
yield (idx + 1, "Line is longer than %d characters" % max_length)