From b99509289a246cb2e62c535f97c2e06c0eecc640 Mon Sep 17 00:00:00 2001 From: jan Date: Sat, 12 Aug 2017 19:31:02 -0700 Subject: [PATCH] Let layer be a tuple of ints (or just a single int like before) --- masque/shapes/shape.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/masque/shapes/shape.py b/masque/shapes/shape.py index c12a58b..bb4687e 100644 --- a/masque/shapes/shape.py +++ b/masque/shapes/shape.py @@ -120,20 +120,16 @@ class Shape(metaclass=ABCMeta): # layer property @property - def layer(self) -> int: + def layer(self) -> int or Tuple[int]: """ - Layer number (int, >=0) + Layer number (int or tuple of ints) :return: Layer """ return self._layer @layer.setter - def layer(self, val: int): - if not isinstance(val, int): - raise PatternError('Layer must be an integer') - if not val >= 0: - raise PatternError('Layer must be non-negative') + def layer(self, val: int or List[int]): self._layer = val # dose property