diff options
author | Danglewood <85772166+deeleeramone@users.noreply.github.com> | 2024-05-10 13:55:52 -0700 |
---|---|---|
committer | Danglewood <85772166+deeleeramone@users.noreply.github.com> | 2024-05-10 13:55:52 -0700 |
commit | 80a0c3b79b6c141caf6883473b5e6e59de487e0b (patch) | |
tree | 20b6dd0a4e36a734fd634377b76d7fb1c937ac32 | |
parent | 5585f20fdae2269474cfc9d5e29e1cc2d1fd25d6 (diff) |
pylint
-rw-r--r-- | openbb_platform/providers/fmp/openbb_fmp/models/economic_calendar.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/economic_calendar.py b/openbb_platform/providers/fmp/openbb_fmp/models/economic_calendar.py index e6969dd302e..1346abce188 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/economic_calendar.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/economic_calendar.py @@ -109,9 +109,7 @@ class FMPEconomicCalendarFetcher( yield current_date, next_date current_date = next_date + timedelta(days=1) - date_ranges = [ - (start, end) for start, end in date_range(query.start_date, query.end_date) - ] + date_ranges = list(date_range(query.start_date, query.end_date)) urls = [ f"{base_url}from={start_date.strftime('%Y-%m-%d')}&to={end_date.strftime('%Y-%m-%d')}&apikey={api_key}" for start_date, end_date in date_ranges @@ -129,8 +127,7 @@ class FMPEconomicCalendarFetcher( except Exception as e: if len(urls) == 1 or (len(urls) > 1 and n_urls == len(urls)): raise e from e - else: - warn(f"Error in fetching part of the data from FMP -> {e}") + warn(f"Error in fetching part of the data from FMP -> {e}") await asyncio.gather(*[get_one(url) for url in urls]) |