From b0a0251c77e73a3f3c0a755f3fabb9fdf136ccfa Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Tue, 5 Jun 2018 19:13:17 -0400 Subject: Fixed issue with parsing.py on Python 3.4 and 3.5 Apparently versions of Python prior to 3.6 don't allow a comma after the last argument being passed to a method. --- cmd2/parsing.py | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'cmd2/parsing.py') diff --git a/cmd2/parsing.py b/cmd2/parsing.py index 5ff86977..1db78526 100644 --- a/cmd2/parsing.py +++ b/cmd2/parsing.py @@ -57,21 +57,20 @@ class Statement(str): :type output_to: str or None """ - def __new__( - cls, - obj: object, - *, - raw: str = None, - command: str = None, - args: str = None, - argv: List[str] = None, - multiline_command: str = None, - terminator: str = None, - suffix: str = None, - pipe_to: str = None, - output: str = None, - output_to:str = None, - ): + def __new__(cls, + obj: object, + *, + raw: str = None, + command: str = None, + args: str = None, + argv: List[str] = None, + multiline_command: str = None, + terminator: str = None, + suffix: str = None, + pipe_to: str = None, + output: str = None, + output_to:str = None + ): """Create a new instance of Statement We must override __new__ because we are subclassing `str` which is -- cgit v1.2.1