From a39f23f93f642abbfab4851883da214e9ec1c9b5 Mon Sep 17 00:00:00 2001 From: LeeFuuChang Date: Thu, 5 Dec 2024 00:06:48 +0800 Subject: [PATCH] Fix TypeError issue caused by defaultdict type hint --- pybit/_http_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pybit/_http_manager.py b/pybit/_http_manager.py index 3d3d3d2..afb0107 100644 --- a/pybit/_http_manager.py +++ b/pybit/_http_manager.py @@ -1,4 +1,4 @@ -from collections import defaultdict +from typing import DefaultDict, Any from dataclasses import dataclass, field import time import hmac @@ -72,7 +72,7 @@ class _V5HTTPManager: timeout: int = field(default=10) recv_window: bool = field(default=5000) force_retry: bool = field(default=False) - retry_codes: defaultdict[dict] = field( + retry_codes: DefaultDict[dict, Any] = field( default_factory=dict, init=False, )