Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sdk/packages/python/iii/src/iii/iii.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
StreamListGroupsInput,
StreamListInput,
StreamSetInput,
StreamUpdateInput,
)
from .telemetry_types import OtelConfig
from .triggers import Trigger, TriggerConfig, TriggerHandler, TriggerTypeRef
Expand Down Expand Up @@ -1422,13 +1423,18 @@ async def list_groups_handler(data: Any) -> list[str]:
)
return await stream.list_groups(input_data)

async def update_handler(data: Any) -> list[Any]:
input_data = StreamUpdateInput(**data) if isinstance(data, dict) else data
return await stream.update(input_data)

self.register_function({"id": f"stream::get({stream_name})"}, get_handler)
self.register_function({"id": f"stream::set({stream_name})"}, set_handler)
self.register_function({"id": f"stream::delete({stream_name})"}, delete_handler)
self.register_function({"id": f"stream::list({stream_name})"}, list_handler)
self.register_function(
{"id": f"stream::list_groups({stream_name})"}, list_groups_handler
)
self.register_function({"id": f"stream::update({stream_name})"}, update_handler)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Update create_stream() docstring to match the new behavior.

After registering stream::update(...), the docstring still states that update is not registered. Please update the method docs so SDK behavior and documentation stay aligned.

As per coding guidelines, "Check for related inconsistencies with the docs/".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@sdk/packages/python/iii/src/iii/iii.py` at line 1437, The create_stream()
docstring is incorrect about update not being registered; update the docstring
for create_stream() to reflect that register_function is called with {"id":
f"stream::update({stream_name})"} and thus an update handler (update_handler) is
registered for the stream; specifically mention that
stream::update(<stream_name>) is registered via register_function and describe
the behavior of update_handler (what it expects/does) so docs align with the
implemented registration.



class TriggerAction:
Expand Down
Loading