scripts: last space/blank line issues detected by flake8

This commit is contained in:
Anton Shestakov
2018-08-01 10:49:23 +08:00
parent 566b74266f
commit 5ba03f39c5
2 changed files with 2 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ import sys
def is_BOM_encoded_file(path):
""" Returns whether |path| is a file that is encoded in UTF-8 with BOM. """
if not os.path.isfile(path):
if not os.path.isfile(path):
return False
with open(path, 'rb') as f:

View File

@@ -14,6 +14,7 @@ import sys
TRAILING_SEQUENCE = re.compile(r'[ \t][\r\n]')
def has_trailing_whitespace(path):
""" Returns whether |path| has trailing whitespace. """
if os.path.isfile(path):
@@ -26,7 +27,6 @@ def has_trailing_whitespace(path):
return False
if len(sys.argv) > 2:
sys.exit('Usage: {} [root]'.format(sys.argv[0]))