From c5aa8406e1e3968dd04122b9064800effff1e3da Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Tue, 27 Oct 2026 20:04:31 +0000 Subject: [PATCH] Ship the PEP 561 marker with the typed package --- great_ai/py.typed | 1 + great_ai/utilities/evaluate_ranking/evaluate_ranking.py | 6 +++--- tests/test_prediction_regressions.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 great_ai/py.typed diff --git a/great_ai/py.typed b/great_ai/py.typed new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/great_ai/py.typed @@ -0,0 +1 @@ + diff --git a/great_ai/utilities/evaluate_ranking/evaluate_ranking.py b/great_ai/utilities/evaluate_ranking/evaluate_ranking.py index 4f297b0..f518012 100644 --- a/great_ai/utilities/evaluate_ranking/evaluate_ranking.py +++ b/great_ai/utilities/evaluate_ranking/evaluate_ranking.py @@ -1,5 +1,5 @@ from pathlib import Path -from typing import Dict, List, Optional, TypeVar, cast +from typing import Dict, Optional, Sequence, TypeVar, cast import matplotlib import matplotlib.pyplot as plt @@ -14,8 +14,8 @@ T = TypeVar("T", str, float) def evaluate_ranking( - expected: List[T], - actual_scores: List[float], + expected: Sequence[T], + actual_scores: Sequence[float], target_recall: float, title: Optional[str] = "", disable_interpolation: bool = False, diff --git a/tests/test_prediction_regressions.py b/tests/test_prediction_regressions.py index da84fa5..3eeed79 100644 --- a/tests/test_prediction_regressions.py +++ b/tests/test_prediction_regressions.py @@ -99,7 +99,7 @@ def test_flattening_preserves_reserved_trace_fields() -> None: def test_mongo_update_uses_valid_replacement() -> None: - trace = Trace( + trace: Trace = Trace( trace_id="id", created="2026-01-01", original_execution_time_ms=0,