diff --git a/dune_client/api/extensions.py b/dune_client/api/extensions.py index ba64354..8944116 100644 --- a/dune_client/api/extensions.py +++ b/dune_client/api/extensions.py @@ -181,7 +181,7 @@ def upload_csv(self, table_name: str, data: str, description: str = "") -> bool: except KeyError as err: raise DuneError(response_json, "upload_csv response", err) from err - def download_csv(self, query: QueryBase | str | int) -> ExecutionResultCSV: + def download_csv(self, query: Union[QueryBase, str, int]) -> ExecutionResultCSV: """ Almost like an alias for `get_latest_results` but for the csv endpoint. https://dune.com/docs/api/api-reference/get-results/latest-results diff --git a/dune_client/query.py b/dune_client/query.py index 74e5b43..c961cc1 100644 --- a/dune_client/query.py +++ b/dune_client/query.py @@ -10,7 +10,7 @@ def parse_query_object_or_id( - query: QueryBase | str | int, + query: Union[QueryBase, str, int], ) -> tuple[dict[str, str] | None, int]: """ Users are allowed to pass QueryBase or ID into some functions.