Skip to content

Commit

Permalink
fix: prevent kwargs modification during for loop iteration (#685)
Browse files Browse the repository at this point in the history
  • Loading branch information
V3ntus committed Mar 29, 2022
1 parent 4eaa09f commit 556b387
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interactions/api/models/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, **kwargs):
# for key in kwargs:
# setattr(self, key, kwargs[key])

for key in kwargs:
for key in list(kwargs):
if key in self.__slots__ if hasattr(self, "__slots__") else True:
# else case if the mixin is used outside of this library and/or SDK.
setattr(self, key, kwargs[key])
Expand Down

0 comments on commit 556b387

Please sign in to comment.