2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 09:57:15 +01:00

Merge branch 'master' into 'master'

Options: set argparse conflict_handler in constructor

See merge request ita1024/waf!2371
This commit is contained in:
ita1024 2024-05-26 07:55:05 +00:00
commit 7c0532a82d

View File

@ -41,10 +41,9 @@ class ArgParser(argparse.ArgumentParser):
Command-line options parser. Command-line options parser.
""" """
def __init__(self, ctx): def __init__(self, ctx):
argparse.ArgumentParser.__init__(self, add_help=False) argparse.ArgumentParser.__init__(self, add_help=False, conflict_handler='resolve')
self.ctx = ctx self.ctx = ctx
self.usage = self.get_usage() self.usage = self.get_usage()
self.conflict_handler = 'resolve'
def _get_formatter(self): def _get_formatter(self):
"""Initialize the argument parser to the adequate terminal width""" """Initialize the argument parser to the adequate terminal width"""