From fdd87e05825661a007edbdc7ce41faa2d381c59a Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Mon, 13 Mar 2017 10:32:44 -0500 Subject: [PATCH] Multiple fixes to unwedge stable/mitaka * Fix broken test with cmd2 0.7.0 Co-author: todd.leonhardt@gmail.com Closes-Bug: #1672108 (cherry picked from commit 0d670bbcc7c114795305ee7abecb2fb05b8e73a7) * pep8: fix F405 error cliff/argparse.py:9:26: F405 ArgumentParser may be undefined, or defined from star imports: argparse (cherry picked from commit 1ecd63b7a7e9570151daab59fad6a23fe2640ff3) Change-Id: I4bb02749a8fafccaff4ef7ce94ff0c4910fb67e6 --- cliff/argparse.py | 2 +- cliff/tests/test_interactive.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cliff/argparse.py b/cliff/argparse.py index 48468c48..58e26f02 100644 --- a/cliff/argparse.py +++ b/cliff/argparse.py @@ -6,7 +6,7 @@ import sys if sys.version_info < (3, 5): - class ArgumentParser(ArgumentParser): + class ArgumentParser(ArgumentParser): # noqa def __init__(self, *args, **kwargs): self.allow_abbrev = kwargs.pop("allow_abbrev", True) super(ArgumentParser, self).__init__(*args, **kwargs) diff --git a/cliff/tests/test_interactive.py b/cliff/tests/test_interactive.py index 20306d15..424e93cf 100644 --- a/cliff/tests/test_interactive.py +++ b/cliff/tests/test_interactive.py @@ -32,8 +32,8 @@ def test_no_completenames(): def test_both_completenames(): - # cmd2.Cmd define do_hi and do_history methods - _test_completenames(['hi', 'history', 'hips', 'hippo'], 'hi') + # cmd2.Cmd defines do_history method + _test_completenames(['history', 'hips', 'hippo'], 'hi') def _test_completedefault(expecteds, line, begidx):