Skip to content

Commit

Permalink
docs(state): add missing doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
bourdaisj authored and jourdain committed Oct 14, 2024
1 parent c3bf08c commit 09af332
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions trame_server/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ def __init__(
if internal:
internal._children_state.append(self)

def ready(self):
def ready(self) -> None:
"""Mark the state as ready for synchronization."""
if self._ready_flag:
return

Expand All @@ -79,13 +80,15 @@ def ready(self):
child.ready()

@property
def is_ready(self):
def is_ready(self) -> bool:
"""Return True is the instance is ready for synchronization, False otherwise."""
if self._parent_state:
return self._parent_state.is_ready
return self._ready_flag

@property
def translator(self):
def translator(self) -> Translator:
"""Return the translator instance used to namespace the variable names."""
return self._translator

def __getitem__(self, key):
Expand Down

0 comments on commit 09af332

Please sign in to comment.