Skip to content

Commit a26bea8

Browse files
Sameer Al-SakranAsk Solem
authored andcommitted
to_dict is broken, back it out. fix iterate (all on BaseDataType)
1 parent 18f73d7 commit a26bea8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

github2/core.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,12 @@ def to_dict(self):
152152
dict_ = vars(self)
153153
return dict([(attr_name, _meta[attr_name].from_python(attr_value))
154154
for attr_name, attr_value in dict_.items()])
155-
_contribute_method("__dict__", to_dict)
155+
# I don't understand what this is trying to do.
156+
# whatever it was meant to do is broken and is breaking the ability to call "vars" on instantiations, which is breaking all kindsa shit. -AS
157+
#_contribute_method("__dict__", to_dict)
156158

157159
def iterate(self):
158-
not_empty = lambda e: e is not None
160+
not_empty = lambda e: e[1] is not None #AS I *think* this is what was intended.
159161
return iter(filter(not_empty, vars(self).items()))
160162
_contribute_method("__iter__", iterate)
161163

0 commit comments

Comments
 (0)