Skip to content

Commit

Permalink
typing fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TomHall2020 committed Dec 17, 2024
1 parent dba0a1e commit aabc56b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions archeryutils/classifications/agb_field_classifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class GroupData(TypedDict):
classes_long: list[str]
class_HC: npt.NDArray[np.float64]
max_distance: int
min_dists: npt.NDArray[np.float64]
min_dists: npt.NDArray[np.int64]


def _make_agb_field_classification_dict() -> dict[str, GroupData]:
Expand Down Expand Up @@ -122,7 +122,7 @@ def _make_agb_field_classification_dict() -> dict[str, GroupData]:
def _assign_dists(
bowstyle: str,
age: cls_funcs.AGBAgeData,
) -> list[int]:
) -> tuple[npt.NDArray[np.int64], int]:
"""
Assign appropriate minimum distance required for a category and classification.
Expand Down Expand Up @@ -162,7 +162,7 @@ def _assign_dists(

n_classes: int = 9 # [EMB, GMB, MB, B1, B2, B3, A1, A2, A3]

min_dists = np.empty(n_classes)
min_dists = np.zeros(n_classes, dtype=np.int64)
min_dists[0:6] = min_d
min_dists[6:9] = np.maximum(min_d - 10 * np.arange(1, 4), 30)

Expand Down
4 changes: 2 additions & 2 deletions archeryutils/classifications/agb_outdoor_classifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class GroupData(TypedDict):
max_distance: list[int]
classes_long: list[str]
class_HC: npt.NDArray[np.float64]
min_dists: npt.NDArray[np.float64]
min_dists: npt.NDArray[np.int64]
prestige_rounds: list[str]


Expand Down Expand Up @@ -136,7 +136,7 @@ def _assign_min_dist(
gender: str,
age_group: str,
max_dists: list[int],
) -> npt.NDArray[int]:
) -> npt.NDArray[np.int64]:
"""
Assign appropriate minimum distance required for a category and classification.
Expand Down

0 comments on commit aabc56b

Please sign in to comment.