mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
use ANy instead
This commit is contained in:
parent
4c696c3d4c
commit
7f3a99ba6e
1 changed files with 2 additions and 4 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue