Enhance UserQuery model with optional ids and is_blocked fields#406
Enhance UserQuery model with optional ids and is_blocked fields#406julietteceb16 wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughQueryParams now accepts an optional ids: Optional[list[str]] field constrained by MAX_PAGE_SIZE. UserQuery gains an optional is_blocked: Optional[bool] field. Tests were added to validate ids handling, size validation, empty-list acceptance, serialization behavior, and is_blocked exposure. The package version was bumped to 2.1.35.dev2. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #406 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 16 16
Lines 1474 1476 +2
=========================================
+ Hits 1474 1476 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
|
||
|
|
||
| class UserQuery(QueryParams): | ||
| ids: Optional[list[str]] = Field(default=None, max_length=MAX_PAGE_SIZE) |
There was a problem hiding this comment.
Este va en QueryParams para que sea comun a todos.
Note
Low Risk
Additive optional fields on validation DTOs with list-size limits; no auth or persistence logic changed in this diff.
Overview
Extends shared query validation so API clients can filter by multiple user IDs and by blocked state.
QueryParamsnow accepts an optionalidslist (capped at 100 entries, same as page size).UserQueryadds optionalis_blocked. Downstream services that already use these Pydantic models can adopt the new filters without breaking existing fields. Tests cover max-length rejection, empty lists, andmodel_dump(exclude_none=True)behavior.Package version is bumped to
2.1.35.dev2.Reviewed by Cursor Bugbot for commit e4b8d52. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
Tests