Skip to content

Commit

Permalink
Reformat combine_ovals.py with black tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Honny1 committed Nov 8, 2023
1 parent c8dd940 commit f5187ad
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions build-scripts/combine_ovals.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,47 @@
def parse_args():
p = argparse.ArgumentParser()
p.add_argument(
"--build-config-yaml", required=True, dest="build_config_yaml",
"--build-config-yaml",
required=True,
dest="build_config_yaml",
help="YAML file with information about the build configuration. "
"e.g.: ~/scap-security-guide/build/build_config.yml"
"e.g.: ~/scap-security-guide/build/build_config.yml",
)
p.add_argument(
"--product-yaml", required=True, dest="product_yaml",
"--product-yaml",
required=True,
dest="product_yaml",
help="YAML file with information about the product we are building. "
"e.g.: ~/scap-security-guide/rhel7/product.yml"
"e.g.: ~/scap-security-guide/rhel7/product.yml",
)
p.add_argument(
"--build-ovals-dir", required=True, dest="build_ovals_dir",
help="Directory to store intermediate built OVAL files."
"--build-ovals-dir",
required=True,
dest="build_ovals_dir",
help="Directory to store intermediate built OVAL files.",
)
p.add_argument("--output", type=argparse.FileType("wb"), required=True)
p.add_argument(
"--include-benchmark", action="store_true",
"--include-benchmark",
action="store_true",
help="Include OVAL checks from rule directories in the benchmark "
"directory tree which is specified by product.yml "
"in the `benchmark_root` key.")
"in the `benchmark_root` key.",
)
p.add_argument(
"ovaldirs", metavar="OVAL_DIR", nargs="+",
"ovaldirs",
metavar="OVAL_DIR",
nargs="+",
help="Shared directory(ies) from which we will collect OVAL "
"definitions to combine. Order matters, latter directories override "
"former. If --include-benchmark is provided, these will be "
"overwritten by OVALs in the rule directory (which in turn preference "
"oval/{{{ product }}}.xml over oval/shared.xml for a given rule.")
"oval/{{{ product }}}.xml over oval/shared.xml for a given rule.",
)
p.add_argument(
"--log", action="store", default="WARNING",
"--log",
action="store",
default="WARNING",
choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
help="write debug information to the log up to the LOG_LEVEL.",
)
Expand Down

0 comments on commit f5187ad

Please sign in to comment.