black: re-format
black and isort are enabled in the openbmc-build-scripts on Python files
to have a consistent formatting. Re-run the formatter on the whole
repository.
Change-Id: If5c3917e776d658a3485633a530410f200177374
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/extra-properties.py b/extra-properties.py
index f0f195c..2287b62 100755
--- a/extra-properties.py
+++ b/extra-properties.py
@@ -1,34 +1,36 @@
#!/usr/bin/env python3
+import argparse
import os
+
import yaml
from mako.template import Template
-import argparse
def main():
parser = argparse.ArgumentParser(
- description="OpenPOWER FRU VPD parser and code generator")
+ description="OpenPOWER FRU VPD parser and code generator"
+ )
parser.add_argument(
- '-e', '--extra_props_yaml',
- dest='extra_props_yaml',
- default='extra-properties-example.yaml',
- help='input extra properties yaml file to parse')
+ "-e",
+ "--extra_props_yaml",
+ dest="extra_props_yaml",
+ default="extra-properties-example.yaml",
+ help="input extra properties yaml file to parse",
+ )
args = parser.parse_args()
- with open(os.path.join(script_dir, args.extra_props_yaml), 'r') as fd:
+ with open(os.path.join(script_dir, args.extra_props_yaml), "r") as fd:
yamlDict = yaml.safe_load(fd)
# Render the mako template
- template = os.path.join(script_dir, 'extra-properties.mako.hpp')
+ template = os.path.join(script_dir, "extra-properties.mako.hpp")
t = Template(filename=template)
- with open('extra-properties-gen.hpp', 'w') as fd:
- fd.write(
- t.render(
- dict=yamlDict))
+ with open("extra-properties-gen.hpp", "w") as fd:
+ fd.write(t.render(dict=yamlDict))
-if __name__ == '__main__':
+if __name__ == "__main__":
script_dir = os.path.dirname(os.path.realpath(__file__))
main()