Source code for suricata_check.checkers.interface.dummy

 1"""DummyChecker."""
 2
 3import logging
 4from collections.abc import Iterable
 5from typing import Optional
 6
 7from suricata_check.checkers.interface.checker import CheckerInterface
 8
 9_logger = logging.getLogger(__name__)
10
11
[docs] 12class DummyChecker(CheckerInterface): 13 """Dummy class to prevent runtime errors on import.""" 14 15 codes = {} 16 enabled_by_default = False 17 18 def __init__(self: "DummyChecker", include: Optional[Iterable[str]] = None) -> None: 19 """Log an error due to failed imports for the checker.""" 20 _logger.warning( 21 "Failed to initialize %s due to failed imports. Ensure all necessary dependencies are installed.", 22 self.__class__.__name__, 23 ) 24 super().__init__(include=include)