Skip to content

Commit

Permalink
Merge pull request #1724 from sidarth16/patch-4
Browse files Browse the repository at this point in the history
deregister_printer
  • Loading branch information
montyly authored Mar 10, 2023
2 parents 462da76 + 660ccb9 commit 6ff1774
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions slither/slither.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6ff1774

Please sign in to comment.