summaryrefslogtreecommitdiff
path: root/cmd2/utils.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2019-03-13 22:19:02 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2019-03-13 22:19:02 -0400
commitfdc24bf275a902c7927d8c6633a30540d8d95cca (patch)
tree86fbb95f935df0f6923b0485cf23c98108284b44 /cmd2/utils.py
parent677e8bb845ecee0bc58035095fc599ffb074c00f (diff)
downloadcmd2-git-fdc24bf275a902c7927d8c6633a30540d8d95cca.tar.gz
Cleaned up some PyCharm warnings
Diffstat (limited to 'cmd2/utils.py')
-rw-r--r--cmd2/utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd2/utils.py b/cmd2/utils.py
index a8760a65..c43ff62a 100644
--- a/cmd2/utils.py
+++ b/cmd2/utils.py
@@ -88,6 +88,7 @@ def namedtuple_with_defaults(typename: str, field_names: Union[str, List[str]],
Node(val=4, left=None, right=7)
"""
T = collections.namedtuple(typename, field_names)
+ # noinspection PyProtectedMember,PyUnresolvedReferences
T.__new__.__defaults__ = (None,) * len(T._fields)
if isinstance(default_values, collections.Mapping):
prototype = T(**default_values)