Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make search results more ergonomic #498

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

yedpodtrzitko
Copy link
Collaborator

@yedpodtrzitko yedpodtrzitko commented Sep 11, 2024

the current return type of search_library() is a bit unergonomic - it returns a tuple of:
(total_count, page_items), so the result needs to be assigned into two items, which is error-prone

This should make it better - it returns SearchResult which is a wrapper for total_count and page_items, but it can still be treated just as list of items

@CyanVoxel CyanVoxel added Type: Refactor Code that needs to be restructured or cleaned up TagStudio: Library Relating to the TagStudio library system Priority: High An important issue requiring attention Status: Review Needed A review of this is needed and removed Status: Review Needed A review of this is needed labels Sep 11, 2024
@CyanVoxel CyanVoxel removed the Status: Review Needed A review of this is needed label Sep 12, 2024
@CyanVoxel CyanVoxel merged commit c159638 into TagStudioDev:main Sep 13, 2024
5 checks passed
@CyanVoxel CyanVoxel removed the Priority: High An important issue requiring attention label Sep 13, 2024
@yedpodtrzitko yedpodtrzitko deleted the yed/ergonomic-results branch November 18, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TagStudio: Library Relating to the TagStudio library system Type: Refactor Code that needs to be restructured or cleaned up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants