diff options
author | hjoaquim <henriquecjoaquim@gmail.com> | 2024-05-15 14:39:04 +0100 |
---|---|---|
committer | hjoaquim <henriquecjoaquim@gmail.com> | 2024-05-15 14:39:04 +0100 |
commit | b983db69577de20c6a029d34d0941190404ee03d (patch) | |
tree | 153395245d366f51dbf9c89d670e258ab99380f9 | |
parent | 2db438e3ab0332f96381da5f59b9899bf251489a (diff) |
assign to empty dict
-rw-r--r-- | openbb_platform/providers/econdb/openbb_econdb/utils/helpers.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openbb_platform/providers/econdb/openbb_econdb/utils/helpers.py b/openbb_platform/providers/econdb/openbb_econdb/utils/helpers.py index 5b36a49c739..01c4c029372 100644 --- a/openbb_platform/providers/econdb/openbb_econdb/utils/helpers.py +++ b/openbb_platform/providers/econdb/openbb_econdb/utils/helpers.py @@ -400,7 +400,7 @@ async def create_token(use_cache: bool = True) -> str: + " Your IP address may have been flagged by Cloudflare." ) from _ - response: Union[dict, List[dict]] + response: Union[dict, List[dict]] = {} url = "https://www.econdb.com/user/create_token/?reset=0" if use_cache is True: cache_dir = f"{get_user_cache_directory()}/http/econdb_indicators_temp_token" @@ -426,7 +426,7 @@ async def download_indicators(use_cache: bool = True) -> DataFrame: """Response callback to read the CSV response.""" return await response.text() - response: Union[dict, List[dict]] + response: Union[dict, List[dict]] = {} if use_cache is True: cache_dir = f"{get_user_cache_directory()}/http/econdb_indicators" async with CachedSession( @@ -481,7 +481,7 @@ async def get_context( use_cache: bool = True, ) -> Union[dict, List[dict]]: """Get the data for a symbol and a list of countries.""" - response: Union[dict, List[dict]] + response: Union[dict, List[dict]] = {} urls = [] countries = countries if isinstance(countries, list) else countries.split(",") # Multiple countries could be passed in a single request, but the request is prone |