From ecfbd376ed1652be2347bdbb472c9f278ed86bbb Mon Sep 17 00:00:00 2001 From: Ryan Blue Date: Mon, 28 Oct 2024 23:14:48 -0400 Subject: [PATCH] Sort imports, remove args from main --- wpiunits/generate_units.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wpiunits/generate_units.py b/wpiunits/generate_units.py index 0a95266e1a5..9c440d7a3e3 100755 --- a/wpiunits/generate_units.py +++ b/wpiunits/generate_units.py @@ -8,12 +8,12 @@ # those interfaces. # Generated files will be located in wpiunits/src/generated/main/ +import argparse import inspect import re -from jinja2 import Environment, FileSystemLoader from pathlib import Path -import argparse -import sys + +from jinja2 import Environment, FileSystemLoader def output(output_dir, outfn: str, contents: str): @@ -390,7 +390,7 @@ def generate_units(output_directory: Path, template_directory: Path): output(rootPath / "measure", f"Mut{unit_name}.java", mutableContents) -def main(argv): +def main(): script_path = Path(__file__).resolve() dirname = script_path.parent @@ -407,10 +407,10 @@ def main(argv): default=dirname / "src/generate", type=Path, ) - args = parser.parse_args(argv) + args = parser.parse_args() generate_units(args.output_directory, args.template_root) if __name__ == "__main__": - main(sys.argv[1:]) + main()