diff options
| author | whitespace <nobody@nobody> | 2020-10-07 17:22:26 -0400 | 
|---|---|---|
| committer | Quentin Young <qlyoung@nvidia.com> | 2020-10-07 17:22:26 -0400 | 
| commit | 701a01920eee5431d2052aad92aefbdf50ac2139 (patch) | |
| tree | 2bf2339327241f59593b9583b060ebb347db1cea /python/firstheader.py | |
| parent | bd407b54d26981f30a95bc316ea2ed965d070c53 (diff) | |
*: reformat python files
We are now using black.
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Diffstat (limited to 'python/firstheader.py')
| -rw-r--r-- | python/firstheader.py | 14 | 
1 files changed, 7 insertions, 7 deletions
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:  | 
