Clarify trailing whitespace logic

develop
lethosor 2015-03-24 16:08:33 -04:00
parent a5b2b92b30
commit 5c877e4012
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.strip() or 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 ')