From efe6ead27c263afc2a39b2ba7b0a65c6376458bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=98=E6=9D=83=20=E9=A9=AC?= Date: Fri, 10 Nov 2023 16:30:23 +0800 Subject: [PATCH] refactor: notation --- metagpt/roles/role.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/metagpt/roles/role.py b/metagpt/roles/role.py index 4201b0f92..ccad0b018 100644 --- a/metagpt/roles/role.py +++ b/metagpt/roles/role.py @@ -135,7 +135,8 @@ class Role: def _watch(self, actions: Iterable[Type[Action]]): """Watch Actions of interest. Role will select Messages caused by these Actions from its personal message - buffer during _observe.""" + buffer during _observe. + """ tags = {any_to_str(t) for t in actions} self._rc.watch.update(tags) # check RoleContext after adding watch actions @@ -144,7 +145,8 @@ class Role: def subscribe(self, tags: Set[str]): """Used to receive Messages with certain tags from the environment. Message will be put into personal message buffer to be further processed in _observe. By default, a Role subscribes Messages with a tag of its own name - or profile.""" + or profile. + """ self._subscription = tags if self._rc.env: # According to the routing feature plan in Chapter 2.2.3.2 of RFC 113 self._rc.env.set_subscription(self, self._subscription)