From f51144ae6ac3dd28dfdd79fe44e57830be00011d Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Fri, 18 Sep 2020 19:47:31 -0700 Subject: [PATCH] misc doc/import/typing fixes --- masque/label.py | 2 +- masque/pattern.py | 4 ++-- masque/shapes/shape.py | 2 +- masque/traits/__init__.py | 3 +++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/masque/label.py b/masque/label.py index 96c5aa1..c8ca802 100644 --- a/masque/label.py +++ b/masque/label.py @@ -5,7 +5,7 @@ from numpy import pi from .repetition import Repetition from .error import PatternError, PatternLockedError -from .utils import is_scalar, vector2, rotation_matrix_2d, layer_t, AutoSlots, annotations_t +from .utils import vector2, rotation_matrix_2d, layer_t, AutoSlots, annotations_t from .traits import PositionableImpl, LayerableImpl, Copyable, Pivotable, LockableImpl, RepeatableImpl from .traits import AnnotatableImpl diff --git a/masque/pattern.py b/masque/pattern.py index 9edfdd2..adbef2b 100644 --- a/masque/pattern.py +++ b/masque/pattern.py @@ -916,8 +916,8 @@ class Pattern(LockableImpl, AnnotatableImpl, metaclass=AutoSlots): overdraw: Whether to create a new figure or draw on a pre-existing one """ # TODO: add text labels to visualize() - from matplotlib import pyplot - import matplotlib.collections + from matplotlib import pyplot # type: ignore + import matplotlib.collections # type: ignore offset = numpy.array(offset, dtype=float) diff --git a/masque/shapes/shape.py b/masque/shapes/shape.py index b9a0cdd..6c72263 100644 --- a/masque/shapes/shape.py +++ b/masque/shapes/shape.py @@ -5,7 +5,7 @@ import copy import numpy # type: ignore from ..error import PatternError, PatternLockedError -from ..utils import is_scalar, rotation_matrix_2d, vector2, layer_t +from ..utils import rotation_matrix_2d, vector2, layer_t from ..traits import (PositionableImpl, LayerableImpl, DoseableImpl, Rotatable, Mirrorable, Copyable, Scalable, PivotableImpl, LockableImpl, RepeatableImpl, diff --git a/masque/traits/__init__.py b/masque/traits/__init__.py index d885264..3f88554 100644 --- a/masque/traits/__init__.py +++ b/masque/traits/__init__.py @@ -1,3 +1,6 @@ +""" +Traits (mixins) and default implementations +""" from .positionable import Positionable, PositionableImpl from .layerable import Layerable, LayerableImpl from .doseable import Doseable, DoseableImpl