📝 Fix "Decimals in SQLModel" to reference Field() instead of condecimal() - #2035
Open
anxkhn wants to merge 2 commits into
Open
📝 Fix "Decimals in SQLModel" to reference Field() instead of condecimal()#2035anxkhn wants to merge 2 commits into
Field() instead of condecimal()#2035anxkhn wants to merge 2 commits into
Conversation
Contributor
📝 Docs previewLast commit d70a7cd at: https://76173df5.sqlmodel.pages.dev Modified Pages |
Member
|
@anxkhn, the description is too verbose for such small fix.. |
Field() instead of condecimal()
YuriiMotov
approved these changes
Jul 15, 2026
YuriiMotov
left a comment
Member
There was a problem hiding this comment.
LGTM!
Added alternative wording (to avoid calling Field function)
…mal() The 'Decimals in SQLModel' section introduced its example with 'using the condecimal() function', but the example (and current SQLModel) uses Field(max_digits=..., decimal_places=...). condecimal() is a Pydantic v1 constrained-type helper that SQLModel does not re-export, and using it as an annotation trips static type checkers. Reword the sentence to match the paragraph above it and the code sample, both of which already use Field(). Signed-off-by: Anas Khan <[email protected]>
Signed-off-by: Anas Khan <[email protected]>
Author
|
@YuriiMotov updated with your suggested wording and rebased onto current main. could you take another look when convenient? |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the Decimal documentation to match the
Field()example. Closes #354.