-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
type:enhancementEnhancement request targeting an existing experienceEnhancement request targeting an existing experiencetype:questionAn issue that's a questionAn issue that's a question
Description
def get_collection_of_primitive_values(self, primitive_type: Any) -> Optional[List[T]]: inside JsonParseNode takes primitive_type: Any, however we raise an error if primitive_type is not of type primitive_types = {bool, str, int, float, UUID, datetime, timedelta, date, time, bytes}. Why not just make primitive_type be a union type of these supported primitives? But then we could also remove T, since currently I don't quite see the use for it.
Alternatively we could leave T but then shouldn't we make primitive_type have type Type[T] or similar which allows for more restrictive typing on the user's end?
Metadata
Metadata
Assignees
Labels
type:enhancementEnhancement request targeting an existing experienceEnhancement request targeting an existing experiencetype:questionAn issue that's a questionAn issue that's a question
Type
Projects
Status
Done ✔️