Improve types
This commit is contained in:
parent
5c4eac60ee
commit
28ad4950fd
|
@ -32,7 +32,7 @@ def next_launch_api_data(rocket_dir: str, limit: int = 200) -> StrDict | None:
|
||||||
return data
|
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."""
|
"""Get the next upcoming launches from the API."""
|
||||||
data = next_launch_api_data(rocket_dir, limit)
|
data = next_launch_api_data(rocket_dir, limit)
|
||||||
if not data:
|
if not data:
|
||||||
|
@ -158,7 +158,7 @@ def read_cached_launches(rocket_dir: str) -> list[Summary]:
|
||||||
|
|
||||||
def get_launches(
|
def get_launches(
|
||||||
rocket_dir: str, limit: int = 200, refresh: bool = False
|
rocket_dir: str, limit: int = 200, refresh: bool = False
|
||||||
) -> list[Summary]:
|
) -> list[Summary] | None:
|
||||||
"""Get rocket launches with caching."""
|
"""Get rocket launches with caching."""
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
existing = [
|
existing = [
|
||||||
|
|
Loading…
Reference in a new issue