Skip to content

Conversation

@beliaev-maksim
Copy link
Contributor

use advanced search instead of #1933

PR allows users to perform a search without specifying fields. While this is already possible with the current implementation, the service still makes an unnecessary API call to cache fields. This PR resolves that issue by validating the fields cache only when the user explicitly requests fields.

…sible with the current implementation, the service still makes an unnecessary API call to cache fields. This commit resolves that issue by validating the fields cache only when the user explicitly requests fields.
Copy link
Contributor

@adehad adehad left a comment

Choose a reason for hiding this comment

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

Great backwards compatible addition, I'm sure there is a two branch option for the if statement regarding the fields, but clear and well commented for now.

Comment on lines +3713 to +3714
# this is required only for mypy validation
fields = []
Copy link
Contributor

Choose a reason for hiding this comment

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

(non-blocking) in general for these simple comments that don't put us above the line limit, I would push them onto one line, as these comments can get missed and become out of date when not associated with a line of code.

Suggested change
# this is required only for mypy validation
fields = []
fields = [] # help mypy

@adehad adehad added the minor label Apr 16, 2025
@adehad adehad added this pull request to the merge queue Apr 16, 2025
Merged via the queue into pycontribs:main with commit c9d3a18 Apr 16, 2025
15 of 16 checks passed
@beliaev-maksim beliaev-maksim deleted the lazy-search branch September 12, 2025 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants