Tools: don't check all files if no files-to-check supplied

This commit is contained in:
Peter Barker 2024-01-02 09:59:57 +11:00 committed by Peter Barker
parent 7e51811a24
commit f8fcc96103
1 changed files with 2 additions and 0 deletions

View File

@ -25,6 +25,8 @@ class Flake8Checker(object):
print("****** %s" % (string,)) print("****** %s" % (string,))
def check(self): def check(self):
if len(self.files_to_check) == 0:
return
for path in self.files_to_check: for path in self.files_to_check:
self.progress("Checking (%s)" % path) self.progress("Checking (%s)" % path)
ret = subprocess.run(["flake8", "--show-source"] + self.files_to_check, ret = subprocess.run(["flake8", "--show-source"] + self.files_to_check,