Skip to content

Commit 00aa451

Browse files
committed
Fix type hints
1 parent 21a3501 commit 00aa451

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

py_nextbus/client.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def predictions_for_stop(
9292
route_id: str,
9393
direction_id: str | None = None,
9494
agency_id: str | None = None,
95-
) -> dict[str, Any]:
95+
) -> list[dict[str, Any]]:
9696
agency_id = agency_id or self.agency_id
9797
if not agency_id:
9898
raise NextBusValidationError("Agency ID is required")
@@ -105,7 +105,8 @@ def predictions_for_stop(
105105
f"agencies/{agency_id}/routes/{route_id}/stops/{stop_id}/predictions",
106106
params,
107107
)
108-
return cast(dict[str, Any], result)
108+
109+
return cast(list[dict[str, Any]], result)
109110

110111
def _fetch_api_key(self) -> str:
111112
response = requests.get(self.referer)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name="py_nextbusnext",
9-
version="2.0.2",
9+
version="2.0.3",
1010
author="ViViDboarder",
1111
description="Minimalistic Python client for the NextBus public API for real-time transit "
1212
"arrival data",

0 commit comments

Comments
 (0)