pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/fastapi/sqlmodel/pull/1819

ets/global-0bd78641c0a1f3e0.css" /> fix: improve type safety and error handling by N3XT3R1337 · Pull Request #1819 · fastapi/sqlmodel · GitHub
Skip to content

fix: improve type safety and error handling#1819

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

fix: improve type safety and error handling#1819
N3XT3R1337 wants to merge 2 commits intofastapi:mainfrom
N3XT3R1337:fix/improve-code-quality

Conversation

@N3XT3R1337
Copy link
Copy Markdown

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

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.

Please explain why this was moved

Copy link
Copy Markdown
Member

@svlandeg svlandeg left a comment

Choose a reason for hiding this comment

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

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 svlandeg added the bug Something isn't working label Mar 18, 2026
@N3XT3R1337
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.

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.

3 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy