@@ -23,7 +23,7 @@ def of_type(cls, converter: type):
2323 return type (name , bases , attributes )
2424
2525 @classmethod
26- def to_python_value (cls , deserialized_data , * , target_object ):
26+ def to_python_value (cls , deserialized_data , * , target_object = None ):
2727 if target_object is None or target_object is Missing :
2828 value = []
2929 else :
@@ -92,7 +92,7 @@ class Set(List):
9292 """Base converter for sets."""
9393
9494 @classmethod
95- def to_python_value (cls , deserialized_data , * , target_object ):
95+ def to_python_value (cls , deserialized_data , * , target_object = None ):
9696 if target_object is None or target_object is Missing :
9797 value = set ()
9898 else :
@@ -137,7 +137,7 @@ def of_mapping(cls, key: type, value: type):
137137 return type (name , bases , {})
138138
139139 @classmethod
140- def to_python_value (cls , deserialized_data , * , target_object ):
140+ def to_python_value (cls , deserialized_data , * , target_object = None ):
141141 if isinstance (deserialized_data , dict ):
142142 data = deserialized_data .copy ()
143143 else :
@@ -176,7 +176,7 @@ def of_mappings(cls, dataclass, converters: Dict[str, type]):
176176 return type (name , bases , attributes )
177177
178178 @classmethod
179- def to_python_value (cls , deserialized_data , * , target_object ):
179+ def to_python_value (cls , deserialized_data , * , target_object = None ):
180180 if dataclasses .is_dataclass (deserialized_data ):
181181 data = dataclasses .asdict (deserialized_data )
182182 elif isinstance (deserialized_data , dict ):
0 commit comments