Unverified Commit 58c959a7 authored by whyiug's avatar whyiug Committed by GitHub
Browse files

[Misc]: clean up non-core lint issues (#37049)


Signed-off-by: default avatarwhyiug <whyiug@hotmail.com>
parent bda3eda8
......@@ -546,10 +546,7 @@ def main():
args.prefill_backends = yaml_config.get("prefill_backends", None)
# Check for special modes
if "mode" in yaml_config:
args.mode = yaml_config["mode"]
else:
args.mode = None
args.mode = yaml_config.get("mode", None)
# Batch specs and sizes
# Support both explicit batch_specs and generated batch_spec_ranges
......@@ -572,10 +569,7 @@ def main():
elif "batch_specs" in yaml_config:
args.batch_specs = yaml_config["batch_specs"]
if "batch_sizes" in yaml_config:
args.batch_sizes = yaml_config["batch_sizes"]
else:
args.batch_sizes = None
args.batch_sizes = yaml_config.get("batch_sizes", None)
# Model config
if "model" in yaml_config:
......
......@@ -153,7 +153,7 @@ class MarkdownFormatter(HelpFormatter):
heading_md = f"{self._argument_heading_prefix} {option_strings}\n\n"
self._markdown_output.append(heading_md)
if action.choices or isinstance(action.metavar, (list, tuple)):
if action.choices or isinstance(action.metavar, list | tuple):
choices_iterable = action.choices or action.metavar
choices = f"`{'`, `'.join(str(c) for c in choices_iterable)}`"
self._markdown_output.append(f": Possible choices: {choices}\n\n")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment