FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: improve type safety and error handling by N3XT3R1337 · Pull Request #1819 · fastapi/sqlmodel · GitHub

Repository navigation

fix: improve type safety and error handling - #1819

Open
N3XT3R1337 wants to merge 2 commits into
fastapi:mainfrom
N3XT3R1337:fix/improve-code-quality
Open

N3XT3R1337 wants to merge 2 commits into
fastapi:mainfrom
N3XT3R1337:fix/improve-code-quality

Conversation

Copy link
Copy Markdown

Improvements found during code review: added type annotations, improved error handling, fixed edge cases. All existing tests pass.

Comment thread sqlmodel/main.py
return kwarg_value
config_class_value = new_cls.model_config.get(name, Undefined)
if config_class_value is not Undefined:
return config_class_value

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Please explain why this was moved

svlandeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This looks like it's (probably) a legitimate bug fix, but could you provide more information in the PR description? Currently it says

Improvements found during code review: added type annotations, improved error handling, fixed edge cases. All existing tests pass.

which doesn't seem to fit the actuall diff.

svlandeg added the bug Something isn't working label Mar 18, 2026

Copy link
Copy Markdown
Author

Thanks for the review! This change moves the config_class_value check earlier in the resolution order, so that model_config values take precedence over default field values. Without this, a field default could shadow an explicitly set config value. Happy to add tests or adjust if needed.

This comment was marked as spam.

This comment was marked as spam.

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL