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

Signed-off-by: whyiug <whyiug@hotmail.com>
This commit is contained in:
whyiug
2026-03-28 22:28:16 +08:00
committed by GitHub
parent bda3eda82d
commit 58c959a767
2 changed files with 3 additions and 9 deletions

View File

@@ -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:

View File

@@ -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")