From 8eb29e2b0d3b6079c7ffa9ee7c5ecdafc3e149de Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 19 Feb 2024 11:13:03 +0100 Subject: --show-model-complexity: sort lexically --- lib/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cli.py b/lib/cli.py index f289d4a..81fd9ae 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -216,8 +216,8 @@ def print_model_complexity(model): for attr in model.attributes(name): if len(attr) > attr_len: attr_len = len(attr) - for name in model.names: - for attribute in model.attributes(name): + for name in sorted(model.names): + for attribute in sorted(model.attributes(name)): mf = model.attr_by_name[name][attribute].model_function prefix = f"{name:{key_len}s} {attribute:{attr_len}s}: {mf.get_complexity_score():7d}" try: -- cgit v1.2.3