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:
Dean Troyer 2016-02-10 22:38:15 +00:00 committed by Steve Martinelli
parent 1e3ef64179
commit 3ff91a95d7
3 changed files with 2 additions and 3 deletions

View File

@ -122,7 +122,6 @@ class App(object):
parser = argparse.ArgumentParser(
description=description,
add_help=False,
allow_abbrev=False,
**argparse_kwargs
)
parser.add_argument(

View File

@ -34,7 +34,6 @@ class Command(object):
parser = argparse.ArgumentParser(
description=self.get_description(),
prog=prog_name,
allow_abbrev=False,
)
return parser

View File

@ -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