From 701a01920eee5431d2052aad92aefbdf50ac2139 Mon Sep 17 00:00:00 2001 From: whitespace Date: Wed, 7 Oct 2020 17:22:26 -0400 Subject: *: reformat python files We are now using black. Signed-off-by: Quentin Young --- python/firstheader.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'python/firstheader.py') diff --git a/python/firstheader.py b/python/firstheader.py index 19a85b63e5..bf50f33a33 100644 --- a/python/firstheader.py +++ b/python/firstheader.py @@ -9,21 +9,21 @@ include_re = re.compile('^#\s*include\s+["<]([^ ">]+)[">]', re.M) errors = 0 -files = subprocess.check_output(['git', 'ls-files']).decode('ASCII') +files = subprocess.check_output(["git", "ls-files"]).decode("ASCII") for fn in files.splitlines(): - if not fn.endswith('.c'): + if not fn.endswith(".c"): continue - if fn.startswith('tools/'): + if fn.startswith("tools/"): continue - with open(fn, 'r') as fd: + with open(fn, "r") as fd: data = fd.read() m = include_re.search(data) if m is None: - #sys.stderr.write('no #include in %s?\n' % (fn)) + # sys.stderr.write('no #include in %s?\n' % (fn)) continue - if m.group(1) in ['config.h', 'zebra.h', 'lib/zebra.h']: + if m.group(1) in ["config.h", "zebra.h", "lib/zebra.h"]: continue - sys.stderr.write('%s: %s\n' % (fn, m.group(0))) + sys.stderr.write("%s: %s\n" % (fn, m.group(0))) errors += 1 if errors: -- cgit v1.2.3