Skip to content

Commit f0578a4

Browse files
committed
Clean up code
1 parent 07a4992 commit f0578a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pythonwhat/State.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,11 @@ def update_context(name):
162162
init_kwargs = {**base_kwargs, **kwargs}
163163
child = klass(**init_kwargs)
164164

165-
extra_attrs = set(vars(self).keys()) - set(self.params)
165+
extra_attrs = set(vars(self)) - set(self.params)
166166
for attr in extra_attrs:
167167
# don't copy attrs set on new instances in init
168168
# the cached manual_sigs is passed
169-
if attr not in ["params", "ast_dispatcher", "converters"]:
169+
if attr not in {"params", "ast_dispatcher", "converters"}:
170170
setattr(child, attr, getattr(self, attr))
171171

172172
return child

0 commit comments

Comments
 (0)