From 5bc5184ac2d7330d9f21c9464bd43cccaabdfcd6 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 6 Oct 2024 20:09:42 +0300 Subject: [PATCH] engine: Improve the object oriented model --- kernel_hardening_checker/engine.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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__} >>>' -- 2.31.1