mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-130645: Add color to stdlib argparse CLIs (gh-133380)
This commit is contained in:
parent
2b4e2b7830
commit
4ac916ae33
36 changed files with 66 additions and 33 deletions
11
Lib/pdb.py
11
Lib/pdb.py
|
@ -3296,10 +3296,13 @@ To let the script run up to a given line X in the debugged file, use
|
|||
def main():
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(usage="%(prog)s [-h] [-c command] (-m module | -p pid | pyfile) [args ...]",
|
||||
description=_usage,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
allow_abbrev=False)
|
||||
parser = argparse.ArgumentParser(
|
||||
usage="%(prog)s [-h] [-c command] (-m module | -p pid | pyfile) [args ...]",
|
||||
description=_usage,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
allow_abbrev=False,
|
||||
color=True,
|
||||
)
|
||||
|
||||
# We need to maunally get the script from args, because the first positional
|
||||
# arguments could be either the script we need to debug, or the argument
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue