WIP: make libraries and names first-class!
This commit is contained in:
parent
f834ec6be5
commit
7aaf73cb37
34 changed files with 1780 additions and 1812 deletions
|
|
@ -9,5 +9,4 @@ from .repeatable import Repeatable, RepeatableImpl
|
|||
from .scalable import Scalable, ScalableImpl
|
||||
from .mirrorable import Mirrorable
|
||||
from .copyable import Copyable
|
||||
from .lockable import Lockable, LockableImpl
|
||||
from .annotatable import Annotatable, AnnotatableImpl
|
||||
|
|
|
|||
|
|
@ -44,9 +44,6 @@ class AnnotatableImpl(Annotatable, metaclass=ABCMeta):
|
|||
@property
|
||||
def annotations(self) -> annotations_t:
|
||||
return self._annotations
|
||||
# # TODO: Find a way to make sure the subclass implements Lockable without dealing with diamond inheritance or this extra hasattr
|
||||
# if hasattr(self, 'is_locked') and self.is_locked():
|
||||
# return MappingProxyType(self._annotations)
|
||||
|
||||
@annotations.setter
|
||||
def annotations(self, annotations: annotations_t):
|
||||
|
|
|
|||
|
|
@ -120,23 +120,3 @@ class PositionableImpl(Positionable, metaclass=ABCMeta):
|
|||
def translate(self: I, offset: ArrayLike) -> I:
|
||||
self._offset += offset # type: ignore # NDArray += ArrayLike should be fine??
|
||||
return self
|
||||
|
||||
def _lock(self: I) -> I:
|
||||
"""
|
||||
Lock the entity, disallowing further changes
|
||||
|
||||
Returns:
|
||||
self
|
||||
"""
|
||||
self._offset.flags.writeable = False
|
||||
return self
|
||||
|
||||
def _unlock(self: I) -> I:
|
||||
"""
|
||||
Unlock the entity
|
||||
|
||||
Returns:
|
||||
self
|
||||
"""
|
||||
self._offset.flags.writeable = True
|
||||
return self
|
||||
|
|
|
|||
Loading…
Reference in a new issue