Przeglądaj źródła

support/scripts/pkg-stats: fix flake8 issues

Fixes:
 - blank space before ':'
 - unused 'o' variable left from a previous patch
 - bad continuous alignment

Signed-off-by: Victor Huesca <victor.huesca@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Victor Huesca 6 lat temu
rodzic
commit
3938afe1b5
1 zmienionych plików z 3 dodań i 4 usunięć
  1. 3 4
      support/scripts/pkg-stats

+ 3 - 4
support/scripts/pkg-stats

@@ -245,7 +245,7 @@ def package_init_make_info():
             pkgvar = pkgvar[:-8]
             pkgvar = pkgvar[:-8]
             Package.all_licenses.append(pkgvar)
             Package.all_licenses.append(pkgvar)
 
 
-        elif pkgvar.endswith("_LICENSE_FILES") :
+        elif pkgvar.endswith("_LICENSE_FILES"):
             if pkgvar.endswith("_MANIFEST_LICENSE_FILES"):
             if pkgvar.endswith("_MANIFEST_LICENSE_FILES"):
                 continue
                 continue
             pkgvar = pkgvar[:-14]
             pkgvar = pkgvar[:-14]
@@ -682,7 +682,6 @@ def dump_json(packages, stats, date, commit, output):
     }
     }
     statistics['infra'] = {k[6:]: v for k, v in stats.items() if k.startswith('infra-')}
     statistics['infra'] = {k[6:]: v for k, v in stats.items() if k.startswith('infra-')}
     # The actual structure to dump, add commit and date to it
     # The actual structure to dump, add commit and date to it
-    o = subprocess.check_output(["git", "log", "master", "-n", "1", "--pretty=format:%H"])
     final = {'packages': pkgs,
     final = {'packages': pkgs,
              'stats': statistics,
              'stats': statistics,
              'commit': commit,
              'commit': commit,
@@ -702,9 +701,9 @@ def parse_args():
                         help='JSON output file')
                         help='JSON output file')
     packages = parser.add_mutually_exclusive_group()
     packages = parser.add_mutually_exclusive_group()
     packages.add_argument('-n', dest='npackages', type=int, action='store',
     packages.add_argument('-n', dest='npackages', type=int, action='store',
-                        help='Number of packages')
+                          help='Number of packages')
     packages.add_argument('-p', dest='packages', action='store',
     packages.add_argument('-p', dest='packages', action='store',
-                        help='List of packages (comma separated)')
+                          help='List of packages (comma separated)')
     args = parser.parse_args()
     args = parser.parse_args()
     if not args.html and not args.json:
     if not args.html and not args.json:
         parser.error('at least one of --html or --json (or both) is required')
         parser.error('at least one of --html or --json (or both) is required')