Skip to content

Commit

Permalink
Correct docstrings in base component type.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 675091074
Change-Id: Id92c73aee26f5b1426fdc3b49793484d1eb8b38a
  • Loading branch information
jzleibo authored and copybara-github committed Sep 16, 2024
1 parent 59d35ac commit a50a731
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions concordia/typing/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand All @@ -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(
Expand All @@ -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,
Expand All @@ -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
Expand All @@ -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 []

0 comments on commit a50a731

Please sign in to comment.