use ANy instead

This commit is contained in:
Jun-te Kim 2026-04-02 10:24:11 +00:00
parent 4c696c3d4c
commit 7f3a99ba6e

View file

@ -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.