diff --git a/slither/slither.py b/slither/slither.py index 6f1bf61cdb..85f852e1d5 100644 --- a/slither/slither.py +++ b/slither/slither.py @@ -207,6 +207,16 @@ def register_printer(self, printer_class: Type[AbstractPrinter]) -> None: instance = printer_class(self, logger_printer) self._printers.append(instance) + def unregister_printer(self, printer_class: Type[AbstractPrinter]) -> None: + """ + :param printer_class: Class inheriting from `AbstractPrinter`. + """ + + for obj in self._printers: + if isinstance(obj, printer_class): + self._printers.remove(obj) + return + def run_detectors(self) -> List[Dict]: """ :return: List of registered detectors results.