diff --git a/scripts/readme-gen/readme_gen.py b/scripts/readme-gen/readme_gen.py index b533840a..91b59676 100644 --- a/scripts/readme-gen/readme_gen.py +++ b/scripts/readme-gen/readme_gen.py @@ -33,17 +33,17 @@ autoescape=True, ) -README_TMPL = jinja_env.get_template("README.tmpl.rst") +README_TMPL = jinja_env.get_template('README.tmpl.rst') def get_help(file): - return subprocess.check_output(["python", file, "--help"]).decode() + return subprocess.check_output(['python', file, '--help']).decode() def main(): parser = argparse.ArgumentParser() - parser.add_argument("source") - parser.add_argument("--destination", default="README.rst") + parser.add_argument('source') + parser.add_argument('--destination', default='README.rst') args = parser.parse_args() @@ -51,9 +51,9 @@ def main(): root = os.path.dirname(source) destination = os.path.join(root, args.destination) - jinja_env.globals["get_help"] = get_help + jinja_env.globals['get_help'] = get_help - with io.open(source, "r") as f: + with io.open(source, 'r') as f: config = yaml.load(f) # This allows get_help to execute in the right directory. @@ -61,9 +61,9 @@ def main(): output = README_TMPL.render(config) - with io.open(destination, "w") as f: + with io.open(destination, 'w') as f: f.write(output) -if __name__ == "__main__": +if __name__ == '__main__': main()