Run yapf on all python files in the repo
Signed-off-by: Ravago Jones <ravagojones@gmail.com>
Change-Id: I221e04c3f517fab8535b22551553799e0fee7a80
diff --git a/tools/build_rules/jinja2_generator.py b/tools/build_rules/jinja2_generator.py
index 34f3354..e5f6fa3 100644
--- a/tools/build_rules/jinja2_generator.py
+++ b/tools/build_rules/jinja2_generator.py
@@ -8,22 +8,26 @@
def main():
- # Note: this is a pretty transparent interface to jinja2--there's no reason
- # this script couldn't be renamed and then used to generate any config from
- # a template.
- parser = argparse.ArgumentParser(
- description="Generates the raspberry pi configs from a template.")
- parser.add_argument("template", type=str, help="File to use for template.")
- parser.add_argument("replacements", type=json.loads, help="Dictionary of parameters to replace in the template.")
- parser.add_argument("output", type=str, help="Output file to create.")
- args = parser.parse_args(sys.argv[1:])
+ # Note: this is a pretty transparent interface to jinja2--there's no reason
+ # this script couldn't be renamed and then used to generate any config from
+ # a template.
+ parser = argparse.ArgumentParser(
+ description="Generates the raspberry pi configs from a template.")
+ parser.add_argument("template", type=str, help="File to use for template.")
+ parser.add_argument(
+ "replacements",
+ type=json.loads,
+ help="Dictionary of parameters to replace in the template.")
+ parser.add_argument("output", type=str, help="Output file to create.")
+ args = parser.parse_args(sys.argv[1:])
- with open(args.template, 'r') as input_file:
- template = jinja2.Template(input_file.read())
+ with open(args.template, 'r') as input_file:
+ template = jinja2.Template(input_file.read())
- output = template.render(args.replacements)
- with open(args.output, 'w') as config_file:
- config_file.write(output)
+ output = template.render(args.replacements)
+ with open(args.output, 'w') as config_file:
+ config_file.write(output)
+
if __name__ == '__main__':
- main()
+ main()