Skip to content

Commit 498a24a

Browse files
tode-rlclaude
andcommitted
fix: resolve mypy type errors in axons.py
Fixed 3 mypy errors: 1. Removed duplicate import of axon_subscribe_sse_params on line 32 2. Added explicit type annotation for sequence_to_use: int | Omit (sync) 3. Added explicit type annotation for sequence_to_use: int | Omit (async) This allows the variable to hold either an int or an Omit value, which is then properly filtered by the transform() function. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 14085b9 commit 498a24a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • src/runloop_api_client/resources/axons

src/runloop_api_client/resources/axons/axons.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
from ..._constants import RAW_RESPONSE_HEADER
3030
from ..._streaming import Stream, AsyncStream, ReconnectingStream, AsyncReconnectingStream
3131
from ...pagination import SyncAxonsCursorIDPage, AsyncAxonsCursorIDPage
32-
from ...types.axons import axon_subscribe_sse_params
3332
from ..._base_client import AsyncPaginator, make_request_options
3433
from ...types.axon_view import AxonView
3534
from ...types.axon_event_view import AxonEventView
@@ -311,6 +310,7 @@ def subscribe_sse(
311310

312311
def create_stream(last_sequence: str | None) -> Stream[AxonEventView]:
313312
# Use user-provided after_sequence for initial stream, then use last_sequence for reconnections
313+
sequence_to_use: int | Omit
314314
if last_sequence is not None:
315315
sequence_to_use = int(last_sequence)
316316
elif not isinstance(after_sequence, Omit):
@@ -626,6 +626,7 @@ async def subscribe_sse(
626626

627627
async def create_stream(last_sequence: str | None) -> AsyncStream[AxonEventView]:
628628
# Use user-provided after_sequence for initial stream, then use last_sequence for reconnections
629+
sequence_to_use: int | Omit
629630
if last_sequence is not None:
630631
sequence_to_use = int(last_sequence)
631632
elif not isinstance(after_sequence, Omit):

0 commit comments

Comments
 (0)