diff --git a/slither/__main__.py b/slither/__main__.py index db2f75191..a9676e9fb 100644 --- a/slither/__main__.py +++ b/slither/__main__.py @@ -662,7 +662,7 @@ def main_impl(all_detector_classes, all_printer_classes): # If we are outputting JSON, capture all standard output. If we are outputting to stdout, we block typical stdout # output. if outputting_json or output_to_sarif: - StandardOutputCapture.enable(outputting_json_stdout or outputting_sarif_stdout ) + StandardOutputCapture.enable(outputting_json_stdout or outputting_sarif_stdout) printer_classes = choose_printers(args, all_printer_classes) detector_classes = choose_detectors(args, all_detector_classes) diff --git a/slither/utils/output.py b/slither/utils/output.py index 4692bd0bb..649aeccb8 100644 --- a/slither/utils/output.py +++ b/slither/utils/output.py @@ -122,7 +122,8 @@ def output_to_sarif(filename: str, results: Dict): if ( len([x for x in sarif["runs"][0]["tool"]["driver"]["rules"] if x["id"] == check_id]) == 0 - ): sarif["runs"][0]["tool"]["driver"]["rules"].append(rule) + ): + sarif["runs"][0]["tool"]["driver"]["rules"].append(rule) sarif["runs"][0]["results"].append( {