Skip to content

Commit

Permalink
removed unnecessary loop in to_json method
Browse files Browse the repository at this point in the history
  • Loading branch information
karrmagadgeteer2 committed Nov 11, 2023
1 parent 21e18c8 commit dc37e2d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions openseries/common_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,8 @@ def to_json(
data.pop(item)
output.append(dict(data))
else:
series = [
dict(serie.__dict__)
for serie in cast(list[Any], data.get("constituents"))
]
for itemdata in series:
for serie in cast(list[Any], data.get("constituents")):
itemdata = dict(serie.__dict__)
for item in cleaner_list:
itemdata.pop(item)
output.append(dict(itemdata))
Expand Down

0 comments on commit dc37e2d

Please sign in to comment.