allow to remove a property defined in a base class

the same mechanism works already for parameters

Change-Id: I19da668ded9697b0f51069af9ddd752091abd0fc
This commit is contained in:
2025-10-29 14:05:13 +01:00
parent 24153d2584
commit 174da915d2

View File

@@ -141,6 +141,10 @@ class HasProperties(HasDescriptors):
for pn, po in list(properties.items()):
value = getattr(cls, pn, po)
if not isinstance(value, Property): # attribute may be a bare value
if value is None:
# this allows to remove a property defined in a base class
cls.propertyDict.pop(pn)
continue
po = po.copy()
try:
# try to apply bare value to Property