Skip to content

Commit

Permalink
fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
honzajavorek committed Jan 6, 2025
1 parent 147474c commit a0c11ed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fiobank.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,11 @@ def info(self) -> dict:
def _fetch_period(
self, from_date: str | date | datetime, to_date: str | date | datetime
) -> dict:
return self._request(
if data := self._request(
"periods", from_date=coerce_date(from_date), to_date=coerce_date(to_date)
)
):
return data
raise ValueError("No data available")

def period(
self, from_date: str | date | datetime, to_date: str | date | datetime
Expand Down

0 comments on commit a0c11ed

Please sign in to comment.