From a50a73186bd930311ee5d4ea45199fabae033856 Mon Sep 17 00:00:00 2001 From: "Joel Z. Leibo" Date: Mon, 16 Sep 2024 04:14:36 -0700 Subject: [PATCH] Correct docstrings in base component type. PiperOrigin-RevId: 675091074 Change-Id: Id92c73aee26f5b1426fdc3b49793484d1eb8b38a --- concordia/typing/component.py | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/concordia/typing/component.py b/concordia/typing/component.py index d2e40a85..40026da3 100644 --- a/concordia/typing/component.py +++ b/concordia/typing/component.py @@ -44,7 +44,7 @@ def state( state of the component or None. If none is returned, then the component will be omitted while forming the context of action. """ - pass + return None def partial_state( self, @@ -59,7 +59,6 @@ def partial_state( specified player's view of the component's current state or None. If none is returned, then the component will not be sent to the player. """ - del player_name return None @@ -69,16 +68,11 @@ def observe( ) -> None: """Observe data.""" del observation - return None def update( self, ) -> None: - """Updates the component from memory. - - Returns: - The updated state of the component. - """ + """Updates the component from memory.""" pass def update_before_event( @@ -89,12 +83,8 @@ def update_before_event( Args: cause_statement: The cause statement to update the component before event. - - Returns: - New state of the component or None. """ del cause_statement - return None def update_after_event( self, @@ -104,12 +94,8 @@ def update_after_event( Args: event_statement: The event statement to update the component from. - - Returns: - The summary of the update or None. """ del event_statement - return None def terminate_episode(self) -> bool: return False @@ -120,8 +106,6 @@ def get_last_log( """Returns a dictionary with latest log of activity.""" return None - def get_components( - self, - ) -> Sequence['Component']: - """Returns a list of components or an empty list.""" + def get_components(self) -> Sequence['Component']: + """Returns a list of subcomponents or an empty list.""" return []