From 76bf50562879ccbe0df14093333bd6d1aa89e124 Mon Sep 17 00:00:00 2001 From: Abdelrahman <20213927+Abdelrahman0W@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:32:23 +0200 Subject: [PATCH] fix: pre-commit hooks --- ouro/__main__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ouro/__main__.py b/ouro/__main__.py index 058c235..f3a14bc 100644 --- a/ouro/__main__.py +++ b/ouro/__main__.py @@ -84,6 +84,8 @@ def main(): possible_origins = checker.get_possible_origins(cycles) if cycles: + retv = 1 + logger.fail("FOUND CIRCULAR IMPORT(S)!", highlight=True) logger.warn( "PROBABLY ONE OF THE FOLLOWING IS THE ORIGIN", highlight=True @@ -109,12 +111,16 @@ def main(): f"REPORT EXPORTED TO: {export_path}", highlight=True ) else: + retv = 0 + logger.success("WHOA! NO CIRCULAR IMPORT(S) FOUND!", highlight=True) logger.info( f"ELAPSED TIME: {time() - start_time:.2f} seconds", highlight=True ) + return retv + if __name__ == "__main__": - main() + raise SystemExit(main())