refactor: use generic type in EnumPropHelper

- use typing.Generic in EnumPropHelper and its child classes.
- change Doxygen docstring into reStructedText docstring.
This commit is contained in:
2025-07-30 10:56:24 +08:00
parent fc34b19a42
commit a9a889a8fd
5 changed files with 173 additions and 117 deletions

View File

@ -187,15 +187,14 @@ class PrototypeShowcaseCfgDescriptor():
def get_default(self) -> typing.Any:
return _eval_showcase_cfgs_default(self.__mRawCfg[TOKEN_SHOWCASE_CFGS_DEFAULT])
class EnumPropHelper(UTIL_functions.EnumPropHelper):
class EnumPropHelper(UTIL_functions.EnumPropHelper[str]):
"""
The BME specialized Blender EnumProperty helper.
"""
def __init__(self):
# init parent class
UTIL_functions.EnumPropHelper.__init__(
self,
super().__init__(
self.get_bme_identifiers(),
lambda x: x,
lambda x: x,