MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / normalize_match

Function normalize_match

tests/test_cli.py:26–28  ·  view source on GitHub ↗
(match: re.Match[str])

Source from the content-addressed store, hash-verified

24
25def normalize_argparse_choice_quotes(text: str) -> str:
26 def normalize_match(match: re.Match[str]) -> str:
27 choices = ARGPARSE_QUOTED_CHOICE_PATTERN.sub(r"\1", match.group("choices"))
28 return f"(choose from {choices})"
29
30 return ARGPARSE_CHOICES_PATTERN.sub(normalize_match, text)
31

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected