This PR makes @docannotate decorator to work correctly with complex types in type annotations.
Supported complex types are List[t] and Dict[t, t] from builtin typing module. These types are internally mapped to our existing type factories list and map.
For List[t] type - conversion from string and formatting of return value to string is supported
For Dict[t, t] - only formatting of return value to string is supported
This PR makes @docannotate decorator to work correctly with complex types in type annotations. Supported complex types are
List[t]
andDict[t, t]
from builtintyping
module. These types are internally mapped to our existing type factorieslist
andmap
. ForList[t]
type - conversion from string and formatting of return value to string is supported ForDict[t, t]
- only formatting of return value to string is supportedExample:
Added an appropriate test case.
Notes:
typing
module (List
,Dict
) is not supportedDict[t, t]
is not supported since it was not supported before for amap
type factory.Please, let me know if I should update this PR to support mentioned above.
Closes #62