If no type is provided, string is assumed by default, e.g. name; names:list; translations:dict; ...
As already implemented, the dot is used for (sub)attributes of a model. If a column header has dot attributes, we can use that information for type inference:
Examples:
name.0 --> We infer that name is a list
name.0:str --> We infer that name is a list of strings
translations.eng --> we infer that translations is a dict
Especially for data sheets, it is often inconvenient having to specify the model as a pydantic model in a dedicated python file.
Often, these models are simple, and could be constructed from the column headers.
Proposal:
Colon as optional type annotation: e.g.
name:str
;names:list[str]
;translations:dict[str,str]
; ...name
;names:list
;translations:dict
; ...As already implemented, the dot is used for (sub)attributes of a model. If a column header has dot attributes, we can use that information for type inference:
Examples:
name.0
--> We infer that name is a listname.0:str
--> We infer that name is a list of stringstranslations.eng
--> we infer that translations is a dict