merge until "support write_ method on readonly param and more"

from gerrit

Change-Id: I8d2ad2a381d3a37947d8afc5e17be0428d94df36
This commit is contained in:
2022-03-21 14:00:12 +01:00
parent 7c9296fe2e
commit b1ddc01fbb
24 changed files with 604 additions and 436 deletions

View File

@ -22,7 +22,7 @@
# *****************************************************************************
"""Define validated data types."""
# pylint: disable=abstract-method
# pylint: disable=abstract-method, too-many-lines
import sys
@ -454,7 +454,10 @@ class EnumType(DataType):
super().__init__()
if members is not None:
kwds.update(members)
self._enum = Enum(enum_or_name, **kwds)
if isinstance(enum_or_name, str):
self._enum = Enum(enum_or_name, kwds) # allow 'self' as name
else:
self._enum = Enum(enum_or_name, **kwds)
self.default = self._enum[self._enum.members[0]]
def copy(self):