tests: replace pycodestyle with black
[vpp.git] / extras / scripts / list_api_changes.py
index ac8cf47..7433f54 100755 (executable)
@@ -4,21 +4,21 @@ import fnmatch
 import os
 import subprocess
 
-starttag = 'v19.08-rc0'
-endtag = 'HEAD'
+starttag = "v19.08-rc0"
+endtag = "HEAD"
 emit_md = True
 apifiles = []
 
-for root, dirnames, filenames in os.walk('.'):
-    for filename in fnmatch.filter(filenames, '*.api'):
+for root, dirnames, filenames in os.walk("."):
+    for filename in fnmatch.filter(filenames, "*.api"):
         apifiles.append(os.path.join(root, filename))
 
 for f in apifiles:
-    commits = subprocess.check_output(['git', 'log',
-                                       '--oneline', starttag + '..' + endtag,
-                                       f])
+    commits = subprocess.check_output(
+        ["git", "log", "--oneline", starttag + ".." + endtag, f]
+    )
     if commits:
-        if f[0:2] == './':
+        if f[0:2] == "./":
             f = f[2:]
         if emit_md:
             print("| @c %s ||" % f)
@@ -27,9 +27,10 @@ for f in apifiles:
                 parts = line.strip().split()
                 commit = parts[0]
                 message = b" ".join(parts[1:]).decode().replace("|", r"\|")
-                print("| [%s](https://gerrit.fd.io/r/gitweb?"
-                      "p=vpp.git;a=commit;h=%s) | %s |" % (
-                            commit, commit, message))
+                print(
+                    "| [%s](https://gerrit.fd.io/r/gitweb?"
+                    "p=vpp.git;a=commit;h=%s) | %s |" % (commit, commit, message)
+                )
             print()
         else:
             print(f)