From 28ad4950fd5889d44729dfea0319770d4b1213b2 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Sun, 14 Jul 2024 23:12:17 +0800 Subject: [PATCH] Improve types --- agenda/thespacedevs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agenda/thespacedevs.py b/agenda/thespacedevs.py index 4092f40..8168d8c 100644 --- a/agenda/thespacedevs.py +++ b/agenda/thespacedevs.py @@ -32,7 +32,7 @@ def next_launch_api_data(rocket_dir: str, limit: int = 200) -> StrDict | None: return data -def next_launch_api(rocket_dir: str, limit: int = 200) -> list[Launch] | None: +def next_launch_api(rocket_dir: str, limit: int = 200) -> list[Summary] | None: """Get the next upcoming launches from the API.""" data = next_launch_api_data(rocket_dir, limit) if not data: @@ -158,7 +158,7 @@ def read_cached_launches(rocket_dir: str) -> list[Summary]: def get_launches( rocket_dir: str, limit: int = 200, refresh: bool = False -) -> list[Summary]: +) -> list[Summary] | None: """Get rocket launches with caching.""" now = datetime.now() existing = [