diff --git a/slither/slither.py b/slither/slither.py index 3e44944b34..6f1bf61cdb 100644 --- a/slither/slither.py +++ b/slither/slither.py @@ -188,6 +188,16 @@ def register_detector(self, detector_class: Type[AbstractDetector]) -> None: instance = detector_class(compilation_unit, self, logger_detector) self._detectors.append(instance) + def unregister_detector(self, detector_class: Type[AbstractDetector]) -> None: + """ + :param detector_class: Class inheriting from `AbstractDetector`. + """ + + for obj in self._detectors: + if isinstance(obj, detector_class): + self._detectors.remove(obj) + return + def register_printer(self, printer_class: Type[AbstractPrinter]) -> None: """ :param printer_class: Class inheriting from `AbstractPrinter`.