Skip to content

Commit c7cf159

Browse files
committed
mypy and ruff solutions
1 parent d58bbed commit c7cf159

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/graphomotor/features/trails/time.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Feature extraction module for time-based metrics in trails drawing data."""
22

3-
from typing import Dict, List, Optional
3+
from typing import Any, Dict, List, Optional
44

55
import pandas as pd
66

@@ -87,7 +87,7 @@ def _find_circle_exit_time(
8787
def calculate_think_times(
8888
segments: List[models.LineSegment],
8989
circles: Dict[str, Dict[str, models.CircleTarget]],
90-
config: Dict[str, List[Dict]],
90+
config: Dict[str, Dict[str, List[Dict[str, Any]]]],
9191
trail_id: str,
9292
) -> List[models.LineSegment]:
9393
"""Calculate think times using consecutive segments approach.

tests/unit/test_trails_time.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Tests for trails time.py."""
22

3-
from typing import Dict, List, Tuple
3+
from typing import Any, Dict, List, Tuple
44

55
import pandas as pd
66
import pytest
@@ -239,8 +239,8 @@ def test_segment_sorting() -> None:
239239
_make_segment("B", "C", [{"x": 5.0, "y": 5.0, "seconds": 2.0}]),
240240
_make_segment("A", "B", [{"x": 0.0, "y": 0.0, "seconds": 1.0}]),
241241
]
242-
circles = {"trail1": {}}
243-
config = {
242+
circles: Dict[str, Dict[str, models.CircleTarget]] = {"trail1": {}}
243+
config: Dict[str, Dict[str, List[Dict[str, Any]]]] = {
244244
"trail1": {"items": [{"label": "A", "order": 1}, {"label": "B", "order": 2}]}
245245
}
246246

0 commit comments

Comments
 (0)