core: add 'core' config section, add disabled_modules/enabled_modules configs, use them for hpi modules and hpi doctor

This commit is contained in:
Dima Gerasimov 2020-09-28 18:53:58 +02:00 committed by karlicoss
parent f939daac99
commit 70c801f692
6 changed files with 121 additions and 35 deletions

View file

@ -6,6 +6,7 @@ C = TypeVar('C')
# todo not sure about it, could be overthinking...
# but short enough to change later
# TODO document why it's necessary?
def make_config(cls: Type[C], migration: Callable[[Attrs], Attrs]=lambda x: x) -> C:
props = dict(vars(cls.__base__))
props = migration(props)