Repository navigation
fix: rename CacheHandler 'input' parameter to avoid shadowing builtin - #9642
Santosh Todkar (todkarsant) wants to merge 1 commit into
Conversation
Strix Security ReviewWarning This pull request has 71 commits after the last Strix review ( ✅ No open security findings. PR summary: Renames the `input` parameter to `tool_input` in `CacheHandler.add()`/`read()` to stop shadowing Python's builtin, and updates the keyword arguments at every in-repo call site while removing the related TODO notes. Review summaryThis PR is a mechanical signature rename: Ruled out (6)
Review 1 on this PR · Reviewed by Strix |
|
Vidit Ostwal (@Vidit-Ostwal) Could you review this PR when you get a chance? Thanks! |
Nick (surlymochan)
left a comment
There was a problem hiding this comment.
Verified the rename is complete — I checked every call site rather than just the diff.
Coverage check:
- All keyword callers are updated:
agent_executor.py(read + add),tools_handler.py,project/utils.py(sync and async wrappers),tool_usage.py(_useand_ause),agent_utils.py(read + add), plus thetest_tool_failure.pytests. - The only other
cache.add/cache.readuser in the repo istests/agents/test_native_tool_hook_contract.py, which calls positionally (cache.add("lookup", key, ...)), so it is unaffected by a keyword rename and correctly untouched by this PR. - The cache key format
f"{tool}-{tool_input}"is unchanged, so existing cached entries stay compatible; the three duplicatedTODO: Rename 'input'...notes incache_handler.pyare removed along with the rename.
Pure rename, no behavior change, and the sweep confirms nothing was missed.
|
Vidit Ostwal (@Vidit-Ostwal) Gentle bump — this PR renames the CacheHandler 'input' parameter to avoid shadowing the builtin. CI is green. Would appreciate a review when you get a chance. |
…hadowing builtin Closes crewAIInc#9336
d9e0a81 to
cf275c8
Compare
Summary
Fixes #9336
inputparameter totool_inputinCacheHandler.add()andCacheHandler.read()methods to avoid shadowing Python's builtininput()function.Files changed
lib/crewai/src/crewai/agents/cache/cache_handler.py— parameter rename in method signatureslib/crewai/src/crewai/agents/tools_handler.py— updated keyword arglib/crewai/src/crewai/agents/agent_executor.py— updated keyword args (2 call sites)lib/crewai/src/crewai/tools/tool_usage.py— updated keyword args (2 call sites)lib/crewai/src/crewai/utilities/agent_utils.py— updated keyword args (2 call sites)lib/crewai/src/crewai/project/utils.py— updated keyword args (4 call sites)lib/crewai/tests/tools/test_tool_failure.py— updated keyword args in testsTest plan
input=as a keyword argument in CacheHandler call sites