@@ -746,6 +746,7 @@ def _message_class_str(self) -> str:
746746 cls_str += self .indent + ":param dialogue_reference: the dialogue reference.\n "
747747 cls_str += self .indent + ":param target: the message target.\n "
748748 cls_str += self .indent + ":param performative: the message performative.\n "
749+ cls_str += self .indent + ":param **kwargs: extra options.\n "
749750 cls_str += self .indent + '"""\n '
750751
751752 cls_str += self .indent + "super().__init__(\n "
@@ -965,7 +966,10 @@ def _valid_replies_str(self) -> str:
965966
966967 :return: the `valid replies` dictionary string
967968 """
968- valid_replies_str = self .indent + "VALID_REPLIES = {\n "
969+ valid_replies_str = (
970+ self .indent
971+ + "VALID_REPLIES: Dict[Message.Performative, FrozenSet[Message.Performative]] = {\n "
972+ )
969973 self ._change_indent (1 )
970974 for performative in sorted (self .spec .reply .keys ()):
971975 valid_replies_str += (
@@ -1067,7 +1071,7 @@ def _dialogue_class_str(self) -> str:
10671071 # Imports
10681072 cls_str += self .indent + "from abc import ABC\n "
10691073 cls_str += (
1070- self .indent + "from typing import Callable, FrozenSet, Type, cast\n \n "
1074+ self .indent + "from typing import Callable, Dict, FrozenSet, Type, cast\n \n "
10711075 )
10721076 cls_str += self .indent + "from aea.common import Address\n "
10731077 cls_str += self .indent + "from aea.protocols.base import Message\n "
@@ -1111,11 +1115,11 @@ def _dialogue_class_str(self) -> str:
11111115 )
11121116 cls_str += (
11131117 self .indent
1114- + "INITIAL_PERFORMATIVES = frozenset({"
1118+ + "INITIAL_PERFORMATIVES: FrozenSet[Message.Performative] = frozenset({"
11151119 + initial_performatives_str
11161120 + "})\n "
11171121 + self .indent
1118- + "TERMINAL_PERFORMATIVES = frozenset({"
1122+ + "TERMINAL_PERFORMATIVES: FrozenSet[Message.Performative] = frozenset({"
11191123 + terminal_performatives_str
11201124 + "})\n "
11211125 + self ._valid_replies_str ()
@@ -1153,7 +1157,7 @@ def _dialogue_class_str(self) -> str:
11531157 self .indent
11541158 + ":param role: the role of the agent this dialogue is maintained for\n "
11551159 )
1156- cls_str += self .indent + ":return: None \n "
1160+ cls_str += self .indent + ":param message_class: the message class used \n "
11571161 cls_str += self .indent + '"""\n '
11581162 cls_str += self .indent + "Dialogue.__init__(\n "
11591163 cls_str += self .indent + "self,\n "
@@ -1216,7 +1220,11 @@ def _dialogue_class_str(self) -> str:
12161220 self .indent
12171221 + ":param self_address: the address of the entity for whom dialogues are maintained\n "
12181222 )
1219- cls_str += self .indent + ":return: None\n "
1223+ cls_str += self .indent + ":param dialogue_class: the dialogue class used\n "
1224+ cls_str += (
1225+ self .indent
1226+ + ":param role_from_first_message: the callable determining role from first message\n "
1227+ )
12201228 cls_str += self .indent + '"""\n '
12211229 cls_str += self .indent + "Dialogues.__init__(\n "
12221230 self ._change_indent (1 )
@@ -1303,7 +1311,6 @@ def _custom_types_module_str(self) -> str:
13031311 _camel_case_to_snake_case (custom_type )
13041312 )
13051313 )
1306- cls_str += self .indent + ":return: None\n "
13071314 cls_str += self .indent + '"""\n '
13081315 cls_str += self .indent + "raise NotImplementedError\n \n "
13091316 self ._change_indent (- 1 )
0 commit comments