Skip to content

Commit

Permalink
Merge pull request #72 from jdavies-st/remove-my-attribute
Browse files Browse the repository at this point in the history
Remove DataModel.my_attribute from public interface
  • Loading branch information
eslavich authored Sep 2, 2021
2 parents 24c72e1 + 5be0800 commit c24f796
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/stdatamodels/model_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c24f796

Please sign in to comment.