[traits.annotatable] Don't break when setting annotations to None

This commit is contained in:
Jan Petykiewicz 2025-04-25 01:24:01 -07:00
parent 3a73fb1d60
commit 1992cf572a

View File

@ -45,6 +45,6 @@ class AnnotatableImpl(Annotatable, metaclass=ABCMeta):
@annotations.setter
def annotations(self, annotations: annotations_t) -> None:
if not isinstance(annotations, dict):
raise MasqueError(f'annotations expected dict, got {type(annotations)}')
if not isinstance(annotations, dict) and annotations is not None:
raise MasqueError(f'annotations expected dict or None, got {type(annotations)}')
self._annotations = annotations