Skip to content

fix(mocks): pass invocation as a tuple to avoid arg name collisions#1585

Merged
akshaylive merged 1 commit intomainfrom
akshaya/naming_bugfix
Apr 22, 2026
Merged

fix(mocks): pass invocation as a tuple to avoid arg name collisions#1585
akshaylive merged 1 commit intomainfrom
akshaya/naming_bugfix

Conversation

@akshaylive
Copy link
Copy Markdown
Collaborator

A function decorated with @mockable previously errored if it had an argument named func or params, because those names collided with positional parameters on the internal response() and get_mocked_response() signatures when user kwargs were spread through.

Bundle (args, kwargs) into a single invocation positional argument so user kwargs are never spread across internal signatures. This removes the collision entirely for any user argument name.

A function decorated with `@mockable` previously errored if it had an
argument named `func` or `params`, because those names collided with
positional parameters on the internal `response()` and `get_mocked_response()`
signatures when user kwargs were spread through.

Bundle `(args, kwargs)` into a single `invocation` positional argument so
user kwargs are never spread across internal signatures. This removes the
collision entirely for any user argument name.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository labels Apr 22, 2026
@akshaylive akshaylive merged commit 27646a4 into main Apr 22, 2026
119 of 121 checks passed
@akshaylive akshaylive deleted the akshaya/naming_bugfix branch April 22, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants