From 5be08000ef4fac5185635b9c3b7d87d17b40d37c Mon Sep 17 00:00:00 2001 From: James Davies Date: Thu, 2 Sep 2021 10:56:34 -0400 Subject: [PATCH] Remove DataModel.my_attribute from public interface --- src/stdatamodels/model_base.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/stdatamodels/model_base.py b/src/stdatamodels/model_base.py index 481ad10f..2fbae6f4 100644 --- a/src/stdatamodels/model_base.py +++ b/src/stdatamodels/model_base.py @@ -656,12 +656,8 @@ def shape(self): self._shape = primary_array.shape return self._shape - def my_attribute(self, attr): - properties = frozenset(("shape", "history", "_extra_fits", "schema")) - return attr in properties - def __setattr__(self, attr, value): - if self.my_attribute(attr): + if attr in frozenset(("shape", "history", "_extra_fits", "schema")): object.__setattr__(self, attr, value) else: properties.ObjectNode.__setattr__(self, attr, value)