You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromparsyfilesimportRootParserfrompytypesimporttypechecked@typecheckedclassFoo:
def__init__(self, bar: str):
self.bar=barrp=RootParser()
print(rp.get_all_conversion_chains_to_type(to_type=Foo)) # $<dict_to_object>$ not in list
Whereas if we remove the @typechecked annotation it works fine.
The text was updated successfully, but these errors were encountered:
smarie
changed the title
Generic <dict_to_object> generic converter is not used for custom types
Generic <dict_to_object> generic converter is not used for custom types decorated with pytypesJan 30, 2018
The culprit is the @typechecked annotation: removing it makes everything go back to normal. The issue is that pytypes does not preserve signatures, so all parsers/converters from parsyfiles that rely on the objects constructor signatures to discover how to build them, declare that they cannot handle these.
smarie
changed the title
Generic <dict_to_object> generic converter is not used for custom types decorated with pytypes
Generic <dict_to_object> converter is not used for custom types decorated with pytypesJan 30, 2018
Whereas if we remove the
@typechecked
annotation it works fine.The text was updated successfully, but these errors were encountered: