Skip to content

Commit

Permalink
Fix mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
clane9 committed Oct 2, 2024
1 parent 141bd21 commit aad3763
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/wristpy/processing/windows.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Generate and filter sleep windows from predicted onsets and offsets."""

from datetime import datetime
from typing import Literal

import numpy as np
Expand All @@ -11,7 +12,7 @@
def generate_sleep_windows(
onset_scores: models.Measurement,
offset_scores: models.Measurement,
min_duration: float = 900.0,
min_duration: int = 900,
) -> pl.DataFrame:
"""Generate sleep windows from predicted onsets and wakeups.
Expand Down Expand Up @@ -61,7 +62,7 @@ def filter_non_sleep_windows(
{"time": sleep_scores.time, "score": sleep_scores.measurements}
)

def test_window(window: tuple[pl.Datetime, pl.Datetime, float]) -> bool:
def test_window(window: tuple[datetime, datetime, float]) -> bool:
window_score = (
sleep_scores_df.filter(pl.col("time").is_between(window[0], window[1]))
.select("score")
Expand Down

0 comments on commit aad3763

Please sign in to comment.