Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Commit

Permalink
fixed docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Toan Quach authored and Toan Quach committed Oct 3, 2023
1 parent 883a9be commit a4e7088
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/taipy/core/data/data_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,17 +551,17 @@ def is_ready_for_reading(self) -> bool:
@property # type: ignore
@_self_reload(_MANAGER_NAME)
def is_valid(self) -> bool:
"""Indicate if this data node is up-to-date.
"""Indicate if this data node is valid.
Returns:
False if the data ever been written or the expiration date has passed.<br/>
True otherwise.
"""
if not self._last_edit_date:
# Never been written so it is not up-to-date
# Never been written so it is not valid
return False
if not self._validity_period:
# No validity period and has already been written, so it is up-to-date
# No validity period and has already been written, so it is valid
return True
if datetime.now() > self.expiration_date:
# expiration_date has been passed
Expand All @@ -570,6 +570,14 @@ def is_valid(self) -> bool:

@property
def is_up_to_date(self) -> bool:
"""Indicate if this data node is up-to-date.
Returns:
False if a preceding data node has been updated before the selected data node
or the selected data is invalid.<br/>
True otherwise.
"""

from ..scenario.scenario import Scenario
from ..taipy import get_parents

Expand Down

0 comments on commit a4e7088

Please sign in to comment.