Skip to content

Fix warnings for bakery and improve Pydantic usage#118

Merged
bschwedler merged 5 commits intomainfrom
fix-warnings
Feb 25, 2025
Merged

Fix warnings for bakery and improve Pydantic usage#118
bschwedler merged 5 commits intomainfrom
fix-warnings

Conversation

@ianpittwood
Copy link
Contributor

Takes our pytest warnings from 94 to 0.

  • Fix warnings about unclosed file handles.
  • Fix a bug (and warning) where snyk monitor calls without tags would cause the validator to throw back a Nonetype.
  • Fixes the before model validator in ManifestBuild to be the correct usage.
  • Improve type hints across multiple models.
    • Make None type hints always explicit.
    • Use the "Annotated Field" method of instantiating defaults on Fields for submodels.
  • Change base_url to a computed_field so it can be serialized. It's possible this should be done in additional places or that other models should have their calculated property fields excluded from serialization.

@github-actions
Copy link

Test Results

246 tests   244 ✅  55s ⏱️
  1 suites    2 💤
  1 files      0 ❌

Results for commit 5f8569b.

Copy link
Contributor

@bschwedler bschwedler left a comment

Choose a reason for hiding this comment

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

Thank you for doing this!

@bschwedler bschwedler merged commit 76e3422 into main Feb 25, 2025
3 checks passed
@bschwedler bschwedler deleted the fix-warnings branch February 25, 2025 14:15
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