Skip to content

Commit 5d68aaf

Browse files
committed
Fix dict factory
1 parent f05fedb commit 5d68aaf

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/apitist/constructor.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,18 @@ def __setitem__(self, key, value):
118118

119119
class AttrsConverter(_Converter, cattr.Converter):
120120
_converter_type = ConverterType.ATTRS
121-
_dict_factory = NothingDict
121+
122+
def __init__(self):
123+
super().__init__()
124+
self.set_dict_factory(NothingDict)
122125

123126

124127
class DataclassConverter(_Converter, convclasses.Converter):
125128
_converter_type = ConverterType.DATACLASS
126-
_dict_factory = MissingDict
129+
130+
def __init__(self):
131+
super().__init__()
132+
self.set_dict_factory(MissingDict)
127133

128134

129135
def Converter(converter_type: ConverterType = ConverterType.ATTRS):

0 commit comments

Comments
 (0)