Skip to content

Validating ParsedMedia.data is not empty#1269

Merged
jamesbraza merged 1 commit intomainfrom
validating-non-empty
Jan 16, 2026
Merged

Validating ParsedMedia.data is not empty#1269
jamesbraza merged 1 commit intomainfrom
validating-non-empty

Conversation

@jamesbraza
Copy link
Copy Markdown
Collaborator

@jamesbraza jamesbraza commented Jan 16, 2026

Enabling client code to avoid if media.data checks


Note

Strengthens media validation to prevent empty image payloads.

  • Update ParsedMedia.data in types.py to require min_length=1 (non-empty bytes)
  • Add test_parsed_media_empty_data_raises asserting ValidationError for empty data

Written by Cursor Bugbot for commit 574adea. Configure here.

@jamesbraza jamesbraza self-assigned this Jan 16, 2026
@jamesbraza jamesbraza added the enhancement New feature or request label Jan 16, 2026
Copilot AI review requested due to automatic review settings January 16, 2026 00:58
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jan 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@maykcaldas maykcaldas left a comment

Choose a reason for hiding this comment

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

lgtm

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 16, 2026
@jamesbraza jamesbraza merged commit 9e87cf6 into main Jan 16, 2026
14 checks passed
@jamesbraza jamesbraza deleted the validating-non-empty branch January 16, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants