Skip to content

Commit 29d6968

Browse files
committed
fix linting
1 parent 4fb9d27 commit 29d6968

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

litellm/proxy/db/redis_update_buffer.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
"""
66

77
import json
8-
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
8+
from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Union
99

1010
from litellm._logging import verbose_proxy_logger
1111
from litellm.caching import RedisCache
12+
from litellm.constants import MAX_REDIS_BUFFER_DEQUEUE_COUNT, REDIS_UPDATE_BUFFER_KEY
1213
from litellm.litellm_core_utils.safe_json_dumps import safe_dumps
1314
from litellm.proxy._types import DBSpendUpdateTransactions
1415
from litellm.secret_managers.main import str_to_bool
@@ -18,9 +19,6 @@
1819
else:
1920
PrismaClient = Any
2021

21-
REDIS_UPDATE_BUFFER_KEY = "litellm_spend_update_buffer"
22-
MAX_REDIS_BUFFER_DEQUEUE_COUNT = 100
23-
2422

2523
class RedisUpdateBuffer:
2624
"""
@@ -245,9 +243,9 @@ def _combine_list_of_transactions(
245243
# Process each field type
246244
for field in transaction_fields:
247245
if transaction.get(field):
248-
for entity_id, amount in transaction[field].items():
249-
combined_transaction[field][entity_id] = (
250-
combined_transaction[field].get(entity_id, 0) + amount
246+
for entity_id, amount in transaction[field].items(): # type: ignore
247+
combined_transaction[field][entity_id] = ( # type: ignore
248+
combined_transaction[field].get(entity_id, 0) + amount # type: ignore
251249
)
252250

253251
return combined_transaction

0 commit comments

Comments
 (0)