Skip to content

fix(cache): rename input parameter to tool_input to avoid shadowing builtin#5741

Open
Immanuel2004 wants to merge 1 commit intocrewAIInc:mainfrom
Immanuel2004:fix/cache-handler-parameter-shadowing
Open

fix(cache): rename input parameter to tool_input to avoid shadowing builtin#5741
Immanuel2004 wants to merge 1 commit intocrewAIInc:mainfrom
Immanuel2004:fix/cache-handler-parameter-shadowing

Conversation

@Immanuel2004
Copy link
Copy Markdown

Description

Fixes the parameter shadowing issue in CacheHandler by renaming the input parameter to tool_input in both add() and read() methods.

Changes

  • Renamed inputtool_input in CacheHandler
  • Updated all call sites in lib/crewai/src/crewai/project/utils.py
  • Removed TODO comments about this issue

Testing

  • test_disabling_cache_for_agent passed
  • test_cache_hitting_between_agents passed
  • All pre-commit hooks passed (ruff, mypy, uv-lock)

…uiltin

- Rename 'input' parameter to 'tool_input' in CacheHandler.add() and CacheHandler.read()
- Update all call sites in lib/crewai/src/crewai/project/utils.py
- Remove TODO comments about parameter shadowing
- Improves code clarity and follows Python naming conventions

All existing tests pass without modification.
Copy link
Copy Markdown
Author

@Immanuel2004 Immanuel2004 left a comment

Choose a reason for hiding this comment

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

Updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants