Skip to content

Commit

Permalink
Cleanup isinstance check in area/area.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfehler committed Dec 8, 2020
1 parent 649b6ee commit 0e1f951
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions stere/areas/area.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ def __init__(self, **kwargs):

self.items = {}
for key, value in kwargs.items():
if (
not isinstance(value, Field)
and not isinstance(value, Area)
and not isinstance(value, Repeating)
):
if not isinstance(value, (Field, Area, Repeating)):
raise ValueError(
(
'Areas must only be initialized with: '
Expand All @@ -57,7 +53,7 @@ def __init__(self, **kwargs):
if value.root is not None:
value.root._element.root = self.root
else:
for k, v in value.items.items():
for _k, v in value.items.items():
v._element.root = self.root
# Repeating sets its root Field's root.
elif isinstance(value, Repeating):
Expand Down

0 comments on commit 0e1f951

Please sign in to comment.