Skip to content

Commit 458f30d

Browse files
committed
Fixing mypy/ruff
1 parent 5ea8bb4 commit 458f30d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/wristpy/core/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ def main(
158158
"-d",
159159
"--allow-duplicates",
160160
help="Whether to allow duplicate timestamps in the sensor data. "
161-
"If this flag is set, no error will be raised during Measurement validation and "
162-
"processing can continue. Only unique timestamps and their corresponding "
161+
"If this flag is set, no error will be raised during Measurement validation "
162+
"and processing can continue. Only unique timestamps and their corresponding "
163163
"sensor values will be kept. "
164164
"The first occurrence of each timestamp is retained. Defaults to False. "
165165
"Note that the presence of duplicate timestamps may indicate sensor "

tests/unit/test_readers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import actfast
77
import numpy as np
88
import pytest
9+
import pytest_mock
910

1011
from wristpy.core import models
1112
from wristpy.io.readers import readers
@@ -145,13 +146,14 @@ def test_timezone_extraction_bin(sample_data_bin: pathlib.Path) -> None:
145146
],
146147
)
147148
def test_allow_duplicates_option(
148-
mocker: pytest.MonkeyPatch, file_type: str, mock_data: dict
149+
mocker: pytest_mock.MockFixture, file_type: str, mock_data: dict
149150
) -> None:
150151
"""Test the allow_duplicates option in read_watch_data function."""
151152
mocker.patch("actfast.read", return_value=mock_data)
152153

153154
watch_data = readers.read_watch_data(f"dummy{file_type}", allow_duplicates=True)
154155

156+
assert watch_data.lux is not None
155157
assert len(watch_data.acceleration.time) == 2
156158
assert len(watch_data.lux.time) == 2
157159
assert np.array_equal(

0 commit comments

Comments
 (0)