gh-130645: Add color to stdlib argparse CLIs (gh-133380)

This commit is contained in:
Hugo van Kemenade 2025-05-05 20:46:46 +03:00 committed by GitHub
parent 2b4e2b7830
commit 4ac916ae33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 66 additions and 33 deletions

View file

@ -1011,7 +1011,7 @@ if hasattr(_os, "fork"):
def _parse_args(arg_list: list[str] | None):
import argparse
parser = argparse.ArgumentParser(
formatter_class=argparse.RawTextHelpFormatter)
formatter_class=argparse.RawTextHelpFormatter, color=True)
group = parser.add_mutually_exclusive_group()
group.add_argument(
"-c", "--choice", nargs="+",