From de960ea0d36762ff3f6561eae174af1fb5354ce8 Mon Sep 17 00:00:00 2001 From: brianhjh <79971906+brianhjh@users.noreply.github.com> Date: Wed, 22 Oct 2025 15:12:48 +0100 Subject: [PATCH 1/3] Update __init__.py --- unit_static_analyser/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unit_static_analyser/__init__.py b/unit_static_analyser/__init__.py index ffcc44b..9b178ac 100644 --- a/unit_static_analyser/__init__.py +++ b/unit_static_analyser/__init__.py @@ -37,6 +37,9 @@ def run() -> None: print("Unit checking completed.") print(f"Errors: {checker.errors}") + print(f"Line number: {key.line}") + print(f"Module name: {checker.node_module_names[key]}") + if args.show_units: print("Units:") for key, val in checker.units.items(): From 7674ba5615d596f1596e5d895590539588554e3c Mon Sep 17 00:00:00 2001 From: brianhjh <79971906+brianhjh@users.noreply.github.com> Date: Wed, 22 Oct 2025 15:34:41 +0100 Subject: [PATCH 2/3] Improved_formatting_update_v1 --- unit_static_analyser/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unit_static_analyser/__init__.py b/unit_static_analyser/__init__.py index 9b178ac..988b0b9 100644 --- a/unit_static_analyser/__init__.py +++ b/unit_static_analyser/__init__.py @@ -37,10 +37,10 @@ def run() -> None: print("Unit checking completed.") print(f"Errors: {checker.errors}") - print(f"Line number: {key.line}") - print(f"Module name: {checker.node_module_names[key]}") if args.show_units: print("Units:") for key, val in checker.units.items(): - print(f"{key.fullname}: {val}") + module_name = checker.node_module_names.get(key, "") + line_number = getattr(key, "line", "") + print(f"{key.fullname}: {val} (Module: {module_name}, Line: {line_number})") From defa506b629f800c09d04d1b1cd9b71c7e91b794 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 22 Oct 2025 14:43:45 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- unit_static_analyser/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/unit_static_analyser/__init__.py b/unit_static_analyser/__init__.py index 988b0b9..680693c 100644 --- a/unit_static_analyser/__init__.py +++ b/unit_static_analyser/__init__.py @@ -37,10 +37,12 @@ def run() -> None: print("Unit checking completed.") print(f"Errors: {checker.errors}") - + if args.show_units: print("Units:") for key, val in checker.units.items(): module_name = checker.node_module_names.get(key, "") line_number = getattr(key, "line", "") - print(f"{key.fullname}: {val} (Module: {module_name}, Line: {line_number})") + print( + f"{key.fullname}: {val} (Module: {module_name}, Line: {line_number})" + )