Skip to content

Conversation

gjeltep
Copy link

@gjeltep gjeltep commented Oct 16, 2025

Description:
Fixes a code quality issue where the type parameter in Exa tools was shadowing Python's reserved type keyword. The parameter has been renamed to search_type.

Changes:

  • Renamed type parameter to search_type in ExaSearchResults._run() method
  • Updated ExaSearchRetriever class to use search_type attribute
  • Updated integration test to use the new parameter name

Issue:
Addresses TODO comment in libs/partners/exa/langchain_exa/tools.py:122

Dependencies:
None

Note:
This is a breaking change for users directly passing type= to these methods. They will need to update to search_type=.

@gjeltep gjeltep requested review from ccurme and mdrxy as code owners October 16, 2025 22:12
@github-actions github-actions bot added fix integration Related to a provider partner package integration labels Oct 16, 2025
Copy link

codspeed-hq bot commented Oct 16, 2025

CodSpeed Performance Report

Merging #33541 will not alter performance

Comparing gjeltep:fix/exa-type-parameter-shadowing (7f3ff62) with master (5489df7)1

Summary

✅ 1 untouched
⏩ 33 skipped2

Footnotes

  1. No successful run was found on master (90b6805) during the generation of this report, so 5489df7 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 33 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@mdrxy mdrxy changed the title fix(exa): rename 'type' parameter to 'search_type' to avoid shadowing Python built-in !fix(exa): rename 'type' parameter to 'search_type' to avoid shadowing Python built-in Oct 16, 2025
@mdrxy mdrxy changed the title !fix(exa): rename 'type' parameter to 'search_type' to avoid shadowing Python built-in fix(exa)!: rename 'type' parameter to 'search_type' to avoid shadowing Python built-in Oct 16, 2025
Copy link
Collaborator

@eyurtsev eyurtsev left a comment

Choose a reason for hiding this comment

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

This is a breaking change in an API -- not something that we can do for a library :)

@eyurtsev eyurtsev closed this Oct 17, 2025
@eyurtsev
Copy link
Collaborator

The way I'd think about this:

it doesn't matter that it's shadowing python's built-in. python allows shadowing built-ins.

we should try avoiding shadowing python builtints when we can, especially if it results in confusing code.

But we shouldn't change code that's working after the fact to appease a linter as it's going break user's actual code for no practical benefit.

@gjeltep gjeltep deleted the fix/exa-type-parameter-shadowing branch October 17, 2025 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking fix integration Related to a provider partner package integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants