This repository has been archived by the owner on Jul 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Build schema fields from plain annotated class. #4
Merged
Conversation
This file contains 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
Owner
justanr
commented
Apr 29, 2018
- Generates fields from class level annotations
- Ignores ClassVar annotations
- Handles Optional/Union[T, None] by generating allow_none in the field options
- Allows registration/overriding of type to field definitions (Registration is provided at local and global level)
- Field constructors are encouraged to be more than just the field type
- Allows setting configuration for fields in a meta
- Will walk parents to find other configurations and combine into a single one
- Will respect fields that exist in the MRO already --- should there be a force option to override the field?
- Can auto register the schema itself when a target class is provided and registers as fields.Nested
I see a red door and I want it pained black
…nverter and scheme
Pull Request Test Coverage Report for Build 46
💛 - Coveralls |
Few more things:
Gonna punt on the default value for now edit: Of the three bullet points above, docs was the hardest to deal with. shows how much I know. lol |
If converter grows an is_scheme method, that might solve the List(Nested(...)) issue. See marshmallow-code/marshmallow#779 for a possible hiccup though. |
Also, should this back port 3.6.5's get type hints fix? edit: no, put a note in the docs recommending against forward declarations to target type in <3.6.5 without back porting the fix. |
update readme, find a way to get mypy to ignore that file for proper depreciation (otherwise full nuclear will be needed), one more pass over docs is needed as well. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.