Skip to content

Add 'sort' filter to specify results order - #57

Open
JackSwingle01 wants to merge 2 commits into
alex9smith:mainfrom
JackSwingle01:main
Open

Add 'sort' filter to specify results order#57
JackSwingle01 wants to merge 2 commits into
alex9smith:mainfrom
JackSwingle01:main

Conversation

@JackSwingle01

Copy link
Copy Markdown

@alex9smith

Copy link
Copy Markdown
Owner

Hey @JackSwingle01 thanks for the PR and sorry it's taken me a while to get to it.

I'm trying to slowly move any validation logic out of the Filters class to stop it being so unwieldy. Are you able to move your new static method to a separate function in validation.py? It'd be great to see some simple tests for it like the validate_tone function has too. You'll also need to rebase onto the latest main.

I'm happy to pick up those changes too if you want to give me write permission to your branch.

JackSwingle01 and others added 2 commits August 3, 2026 13:34
Moves the sort type check out of the Filters class and into a
standalone validate_sort function alongside validate_tone, as
requested in review. VALID_SORT_TYPES moves with it.

Adds unit tests for validate_sort and for the sort filter's effect
on the generated query string.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@JackSwingle01

Copy link
Copy Markdown
Author

Hey @alex9smith sorry about taking so long to get to this, let me know if what I added in the last commit is what you're looking for.

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