summaryrefslogtreecommitdiff
path: root/cmd2/parsing.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-06-05 19:13:17 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2018-06-05 19:13:17 -0400
commitb0a0251c77e73a3f3c0a755f3fabb9fdf136ccfa (patch)
treea47829968b1bbc71a47307df02c29128b8733275 /cmd2/parsing.py
parent9920db607352301d7484b107f87b137ae955750d (diff)
downloadcmd2-git-b0a0251c77e73a3f3c0a755f3fabb9fdf136ccfa.tar.gz
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.
Diffstat (limited to 'cmd2/parsing.py')
-rw-r--r--cmd2/parsing.py29
1 files changed, 14 insertions, 15 deletions
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