Remove more mentions of AutoSlots
This commit is contained in:
parent
57ad73dfca
commit
6be45d0501
@ -5,17 +5,20 @@ import numpy
|
|||||||
from numpy.typing import ArrayLike, NDArray
|
from numpy.typing import ArrayLike, NDArray
|
||||||
|
|
||||||
from .repetition import Repetition
|
from .repetition import Repetition
|
||||||
from .utils import rotation_matrix_2d, AutoSlots, annotations_t
|
from .utils import rotation_matrix_2d, annotations_t
|
||||||
from .traits import PositionableImpl, Copyable, Pivotable, RepeatableImpl, Bounded
|
from .traits import PositionableImpl, Copyable, Pivotable, RepeatableImpl, Bounded
|
||||||
from .traits import AnnotatableImpl
|
from .traits import AnnotatableImpl
|
||||||
|
|
||||||
|
|
||||||
class Label(PositionableImpl, RepeatableImpl, AnnotatableImpl,
|
class Label(PositionableImpl, RepeatableImpl, AnnotatableImpl, Bounded, Pivotable, Copyable):
|
||||||
Bounded, Pivotable, Copyable, metaclass=AutoSlots):
|
|
||||||
"""
|
"""
|
||||||
A text annotation with a position (but no size; it is not drawn)
|
A text annotation with a position (but no size; it is not drawn)
|
||||||
"""
|
"""
|
||||||
__slots__ = ( '_string', )
|
__slots__ = (
|
||||||
|
'_string',
|
||||||
|
# Inherited
|
||||||
|
'_offset', '_repetition', '_annotations',
|
||||||
|
)
|
||||||
|
|
||||||
_string: str
|
_string: str
|
||||||
""" Label string """
|
""" Label string """
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
"""
|
"""
|
||||||
Traits (mixins) and default implementations
|
Traits (mixins) and default implementations
|
||||||
|
|
||||||
|
Traits and mixins should set `__slots__ = ()` to enable use of `__slots__` in subclasses.
|
||||||
"""
|
"""
|
||||||
from .positionable import Positionable, PositionableImpl, Bounded
|
from .positionable import Positionable, PositionableImpl, Bounded
|
||||||
from .layerable import Layerable, LayerableImpl
|
from .layerable import Layerable, LayerableImpl
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# TODO top-level comment about how traits should set __slots__ = (), and how to use AutoSlots
|
|
||||||
|
|
||||||
from typing import Self, Any
|
from typing import Self, Any
|
||||||
from abc import ABCMeta, abstractmethod
|
from abc import ABCMeta, abstractmethod
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user