Skip to content

feat: Use optional flags instead of booleans for Rom filtering #1963

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

Merged
merged 1 commit into from
Jun 10, 2025

Conversation

adamantike
Copy link
Contributor

Description
This change replaces boolean flags for filtering Roms with optional flags. This allows clients to specify whether they want to include or exclude certain types of Roms, such as matched, favourite, duplicate, or playable.

The boolean flags are still supported for backwards compatibility, but they are marked as deprecated. Clients should transition to using the new optional flags in future versions.

The main reason for this change is to allow the exclusion of certain results, without the need to add additional boolean flags, which are also confusing if both its True and False values are used within the same request.

Checklist

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

@adamantike adamantike requested review from gantoine and zurdi15 June 10, 2025 03:15
Copy link

trunk-io bot commented Jun 10, 2025

Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information.

Copy link

github-actions bot commented Jun 10, 2025

Test Results

92 tests  ±0   92 ✅ ±0   29s ⏱️ -2s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 47a7f84. ± Comparison against base commit 7285c2b.

♻️ This comment has been updated with latest results.

This change replaces boolean flags for filtering Roms with optional
flags. This allows clients to specify whether they want to include
or exclude certain types of Roms, such as matched, favourite,
duplicate, or playable.

The boolean flags are still supported for backwards compatibility,
but they are marked as deprecated. Clients should transition to
using the new optional flags in future versions.

The main reason for this change is to allow the exclusion of certain
results, without the need to add additional boolean flags, which are
also confusing if both its `True` and `False` values are used within
the same request.
@adamantike adamantike force-pushed the feat/get-roms-optional-flags-instead-of-bools branch from 143e25f to 47a7f84 Compare June 10, 2025 03:19
Copy link
Member

@gantoine gantoine left a comment

Choose a reason for hiding this comment

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

very nice

@adamantike adamantike merged commit 0e8daf6 into master Jun 10, 2025
10 checks passed
@adamantike adamantike deleted the feat/get-roms-optional-flags-instead-of-bools branch June 10, 2025 17:46
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