Skip to content

Commit

Permalink
Post review fix
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
  • Loading branch information
nrozanov committed Mar 21, 2024
1 parent 797346c commit 5ea9dac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flexmeasures/data/services/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_sensors(
return db.session.scalars(sensor_query).all()


def get_sensor_bdf(sensor: Sensor, staleness_search: dict) -> BeliefsDataFrame | None:
def _get_sensor_bdf(sensor: Sensor, staleness_search: dict) -> BeliefsDataFrame | None:
"""Get bdf for a given sensor with given search parameters."""
bdf = TimedBelief.search(
sensors=sensor,
Expand All @@ -76,7 +76,7 @@ def get_most_recent_knowledge_time(
This knowledge time represents when you could have known about the event
(specifically, when you could have formed an ex-post belief about it).
"""
staleness_bdf = get_sensor_bdf(sensor=sensor, staleness_search=staleness_search)
staleness_bdf = _get_sensor_bdf(sensor=sensor, staleness_search=staleness_search)
return None if staleness_bdf is None else staleness_bdf.knowledge_times[-1]


Expand Down

0 comments on commit 5ea9dac

Please sign in to comment.