Skip to content

Commit 77156d8

Browse files
committed
Support optional parameters of interaction
1 parent 3ae654a commit 77156d8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

checkbox-ng/plainbox/impl/session/remote_assistant.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,14 @@
5353

5454
_logger = logging.getLogger("plainbox.session.remote_assistant")
5555

56-
Interaction = namedtuple("Interaction", ["kind", "message", "extra"])
56+
57+
class Interaction(namedtuple("Interaction", ["kind", "message", "extra"])):
58+
"""
59+
This is a named tuple with optional parameters
60+
"""
61+
62+
def __new__(cls, kind, message="", extra=None):
63+
return super().__new__(cls, kind, message, extra)
5764

5865

5966
class RemoteSessionStates(Enum):

0 commit comments

Comments
 (0)