Skip to content

Commit 59e89cb

Browse files
Patch circular import
1 parent 7caf0d5 commit 59e89cb

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/replit_river/rate_limiter.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@
44
from contextvars import Context
55
from typing import Literal
66

7+
from replit_river.error_schema import RiverException
78
from replit_river.transport_options import ConnectionRetryOptions
8-
from replit_river.v2.client_transport import BudgetExhaustedException
99

1010
logger = logging.getLogger(__name__)
1111

1212

13+
class BudgetExhaustedException(RiverException):
14+
def __init__(self, code: str, message: str, client_id: str) -> None:
15+
super().__init__(code, message)
16+
self.client_id = client_id
17+
18+
1319
class LeakyBucketRateLimit:
1420
"""Asynchronous leaky bucket rate limiter.
1521

src/replit_river/v2/client_transport.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ def __init__(self, code: str, message: str, client_id: str) -> None:
2626
self.client_id = client_id
2727

2828

29-
class BudgetExhaustedException(RiverException):
30-
def __init__(self, code: str, message: str, client_id: str) -> None:
31-
super().__init__(code, message)
32-
self.client_id = client_id
33-
34-
3529
class ClientTransport(Generic[HandshakeMetadataType]):
3630
_session: Session | None
3731

0 commit comments

Comments
 (0)