engine: Improve the object oriented model
authorAlexander Popov <alex.popov@linux.com>
Sun, 6 Oct 2024 17:09:42 +0000 (20:09 +0300)
committerAlexander Popov <alex.popov@linux.com>
Sun, 6 Oct 2024 18:01:15 +0000 (21:01 +0300)
kernel_hardening_checker/engine.py

index 0627adb4ef04b66d86ba82891c3fa3214d91be16..139660a72676486832942d1c8e886de05b69ad78 100755 (executable)
@@ -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__} >>>'