From: Alexander Popov Date: Sun, 6 Oct 2024 17:09:42 +0000 (+0300) Subject: engine: Improve the object oriented model X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=5bc5184ac2d7330d9f21c9464bd43cccaabdfcd6;p=kconfig-hardened-check.git engine: Improve the object oriented model --- diff --git a/kernel_hardening_checker/engine.py b/kernel_hardening_checker/engine.py index 0627adb..139660a 100755 --- a/kernel_hardening_checker/engine.py +++ b/kernel_hardening_checker/engine.py @@ -73,7 +73,7 @@ class OptCheck: @property def opt_type(self) -> StrOrNone: - return None + raise NotImplementedError # pragma: no cover def set_state(self, data: StrOrNone) -> None: assert(data is None or isinstance(data, str)), \ @@ -229,6 +229,9 @@ class ComplexOptCheck: assert hasattr(self.opts[0], 'expected') # true for SimpleNamedOptCheckTypes return self.opts[0].expected + def check(self) -> None: + raise NotImplementedError # pragma: no cover + def table_print(self, mode: StrOrNone, with_results: bool) -> None: if mode == 'verbose': class_name = f'<<< {self.__class__.__name__} >>>'