Revert "app,command: disallow abbrev by default"
This reverts commit 1e3ef64179
.
This changed a default behaviour and broke tempest (and possibly more)
when version 1.16.0 was released.
A proper implementation that allows abbrev to be disabled without
changing the default will follow.
Related-Bug: 1543841
Change-Id: Ib38617ad08d930df1dcf263f4812b746b858a245
This commit is contained in:
parent
1e3ef64179
commit
3ff91a95d7
|
@ -122,7 +122,6 @@ class App(object):
|
|||
parser = argparse.ArgumentParser(
|
||||
description=description,
|
||||
add_help=False,
|
||||
allow_abbrev=False,
|
||||
**argparse_kwargs
|
||||
)
|
||||
parser.add_argument(
|
||||
|
|
|
@ -34,7 +34,6 @@ class Command(object):
|
|||
parser = argparse.ArgumentParser(
|
||||
description=self.get_description(),
|
||||
prog=prog_name,
|
||||
allow_abbrev=False,
|
||||
)
|
||||
return parser
|
||||
|
||||
|
|
|
@ -264,7 +264,8 @@ def test_option_parser_abbrev_issue():
|
|||
def build_option_parser(self, description, version):
|
||||
parser = super(MyApp, self).build_option_parser(
|
||||
description,
|
||||
version)
|
||||
version,
|
||||
argparse_kwargs={'allow_abbrev': False})
|
||||
parser.add_argument('--endpoint')
|
||||
return parser
|
||||
|
||||
|
|
Loading…
Reference in New Issue