MCPcopy Index your code
hub / github.com/commitizen-tools/commitizen / normalize_argparse_choice_quotes

Function normalize_argparse_choice_quotes

tests/test_cli.py:25–30  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

23
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
32
33def test_normalize_argparse_choice_quotes():

Callers 2

test_invalid_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…