-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
seems as good a time as any to leave my general feedback here:
- I strongly recommend using snake_case keys in the schema for better adherence to the python style guide in the generated TypedDict definitions
- the KEY_WHATEVER constants are an antipattern imo. using normal string literals will be better for basically everything. if you want to rename a key, rename it in the generated file with your IDE's rename function and then update the schema
- it's a bit surprising that so many keys in your schema aren't required. I find it's best to have as few optional fields as are necessary. I recommend using the ValidatorWithDefault tool we use in ODR, OPR, caver, etc. to automatically fill in defaults before validating the schema. then you can mark any field with a default as required and avoid messing around with
get()and whatnot
Originally posted by @duncathan in #110 (review)
Additionally we shouldn't use string annotations of the explicit type, but instead use typing_extensions.Self.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels