From 7f3a99ba6ef48b61f511a242b7c1162906fb6c11 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Thu, 2 Apr 2026 10:24:11 +0000 Subject: [PATCH] use ANy instead --- etl/hubspot/hubspotClient.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/etl/hubspot/hubspotClient.py b/etl/hubspot/hubspotClient.py index 72cf2b9c..a9ea535d 100644 --- a/etl/hubspot/hubspotClient.py +++ b/etl/hubspot/hubspotClient.py @@ -1,12 +1,10 @@ import os import time from enum import Enum -from typing import Optional, cast, Callable, TypeVar +from typing import Optional, cast, Callable, Any from hubspot.client import Client # type: ignore[reportMissingTypeStubs] from hubspot.crm.associations import ApiException # type: ignore[reportMissingTypeStubs] - -T = TypeVar("T") from hubspot.crm.objects import SimplePublicObjectInput # type: ignore[reportMissingTypeStubs] from hubspot.crm.objects.api.basic_api import BasicApi as ObjectsBasicApi # type: ignore[reportMissingTypeStubs] from hubspot.crm.deals.api.basic_api import BasicApi as DealsBasicApi # type: ignore[reportMissingTypeStubs] @@ -86,7 +84,7 @@ class HubspotClient: # Sorry - not sorry but enjoy, Past Junte 13/03/2026 # self.client - def _call_with_retry(self, fn: Callable[[], T], max_retries: int = 2) -> T: + def _call_with_retry(self, fn: Callable[[], Any], max_retries: int = 2) -> Any: """ Call fn(), retrying up to max_retries times on 429 rate-limit errors. Waits the minimal amount: the remaining interval window reported by HubSpot headers.