(text: str)
| 23 | |
| 24 | |
| 25 | def 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 | |
| 33 | def test_normalize_argparse_choice_quotes(): |
no outgoing calls
no test coverage detected
searching dependent graphs…