Allowing whitespace-only lines.

develop
Eric Wald 2015-03-22 20:46:46 -06:00
parent 4f963233f4
commit ebb3dc48bf
1 changed files with 1 additions and 1 deletions

@ -74,7 +74,7 @@ class TrailingWhitespaceLinter(Linter):
msg = 'Contains trailing whitespace' msg = 'Contains trailing whitespace'
def check_line(self, line): def check_line(self, line):
line = line.replace('\r', '') line = line.replace('\r', '')
return not line.endswith(' ') and not line.endswith('\t') return not line.strip() or not line.endswith(' ') and not line.endswith('\t')
def fix_line(self, line): def fix_line(self, line):
return line.rstrip('\t ') return line.rstrip('\t ')