mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -197,7 +197,7 @@ class TestProgram(object):
|
|||
return parser
|
||||
|
||||
def _getMainArgParser(self, parent):
|
||||
parser = argparse.ArgumentParser(parents=[parent])
|
||||
parser = argparse.ArgumentParser(parents=[parent], color=True)
|
||||
parser.prog = self.progName
|
||||
parser.print_help = self._print_help
|
||||
|
||||
|
@ -208,7 +208,7 @@ class TestProgram(object):
|
|||
return parser
|
||||
|
||||
def _getDiscoveryArgParser(self, parent):
|
||||
parser = argparse.ArgumentParser(parents=[parent])
|
||||
parser = argparse.ArgumentParser(parents=[parent], color=True)
|
||||
parser.prog = '%s discover' % self.progName
|
||||
parser.epilog = ('For test discovery all test modules must be '
|
||||
'importable from the top level directory of the '
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue