Code formatting for packaging/cli-doc/ (#85167)

This commit is contained in:
Matt Clay
2025-05-15 22:52:24 -07:00
committed by GitHub
parent ed0e78fd9c
commit 930ffd1a83

View File

@@ -213,6 +213,7 @@ def populate_subparser_actions(parser: argparse.ArgumentParser, shared_option_na
@dataclasses.dataclass(frozen=True)
class ActionDoc:
"""Documentation for an action."""
desc: str | None
options: tuple[str, ...]
arg: str | None
@@ -231,11 +232,13 @@ def get_action_docs(parser: argparse.ArgumentParser) -> list[ActionDoc]:
args = action.dest.upper() if isinstance(action, argparse._StoreAction) else None
if args or action.option_strings:
action_docs.append(ActionDoc(
desc=action.help,
options=tuple(action.option_strings),
arg=args,
))
action_docs.append(
ActionDoc(
desc=action.help,
options=tuple(action.option_strings),
arg=args,
)
)
return action_docs