From 470271d5e82573ff5a3cafbf957d4b07874dcc56 Mon Sep 17 00:00:00 2001
From: Virgile Prevosto <virgile.prevosto@m4x.org>
Date: Thu, 11 May 2023 08:43:53 +0200
Subject: [PATCH] lint

---
 share/machdeps/make_machdep/make_machdep.py | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/share/machdeps/make_machdep/make_machdep.py b/share/machdeps/make_machdep/make_machdep.py
index b7eae9a9771..6d15918e72b 100755
--- a/share/machdeps/make_machdep/make_machdep.py
+++ b/share/machdeps/make_machdep/make_machdep.py
@@ -49,7 +49,7 @@ from yaml.representer import Representer
 
 my_path = Path(sys.argv[0]).parent
 
-logging.basicConfig(format='%(levelname)s: %(message)s')
+logging.basicConfig(format="%(levelname)s: %(message)s")
 
 parser = argparse.ArgumentParser(prog="make_machdep")
 parser.add_argument("-v", "--verbose", action="store_true")
@@ -166,10 +166,11 @@ def default_value(typ):
     logging.warning(f"Unexpected type {typ} in YAML schema")
     return None
 
+
 def make_machdep():
     machdep = {}
-    for key,value in schema.items():
-        machdep[key] = default_value(value['type'])
+    for key, value in schema.items():
+        machdep[key] = default_value(value["type"])
     return machdep
 
 
@@ -231,7 +232,6 @@ source_files = [
 
 
 def find_value(name, typ, output):
-
     if typ == "bool":
         expected = "(True|False)"
 
@@ -268,7 +268,10 @@ def find_value(name, typ, output):
                 print(f"[INFO] setting {name} to {value}")
             machdep[name] = value
         else:
-            logging.warning(f"cannot find value of field '{name}', using default value: '{default}'",stacklevel=-1)
+            logging.warning(
+                f"cannot find value of field '{name}', using default value: '{default}'",
+                stacklevel=-1,
+            )
             machdep[name] = default
             if args.verbose:
                 print(f"compiler output is:{output}")
@@ -304,7 +307,7 @@ def find_macros_value(output, is_list=False, entry=None):
         print(f"compiler output is:{output}")
 
 
-for (f, typ) in source_files:
+for f, typ in source_files:
     p = my_path / f
     cmd = compilation_command + [str(p)]
     if typ in ("macro", "macrolist"):
-- 
GitLab