Skip to content

Commit

Permalink
Bug fixed: unmatched types. (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
ATATC committed Dec 12, 2024
1 parent 83d22cd commit 5f8f9d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion leads/data_persistence/analyzer/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def shared_pre(row: dict[str, _Any], i: int) -> tuple[int, float, float]:
return (dt := t - self._lap_start_time), (
ds := mileage - self._lap_start_mileage), 3600000 * ds / dt if dt else 0

def shared_post(duration: float, distance: float, avg_speed: float) -> None:
def shared_post(duration: int, distance: float, avg_speed: float) -> None:
if self._max_lap_duration is None or duration > self._max_lap_duration:
self._max_lap_duration = duration
if self._max_lap_distance is None or distance > self._max_lap_distance:
Expand Down
2 changes: 1 addition & 1 deletion leads_gui/performance_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def frame_rate(self) -> float:
return 1 / _average(self._delay_seq)

def net_delay(self) -> float:
return _average(self._net_delay_seq)
return float(_average(self._net_delay_seq))

def record_frame(self, last_interval: float) -> None:
# add .0000000001 to avoid zero division
Expand Down

0 comments on commit 5f8f9d1

Please sign in to comment.