From acf39d27302afb916a1e9c39bae00d3c59a72e83 Mon Sep 17 00:00:00 2001 From: devdanzin <74280297+devdanzin@users.noreply.github.com> Date: Wed, 23 Aug 2023 21:46:33 -0300 Subject: [PATCH] Fix ruff error due to use of .format() in diff.py. (#207) --- src/wily/commands/diff.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/wily/commands/diff.py b/src/wily/commands/diff.py index 3d32df7c..f9738de6 100644 --- a/src/wily/commands/diff.py +++ b/src/wily/commands/diff.py @@ -140,15 +140,11 @@ def diff( if metric.metric_type in (int, float) and new != "-" and current != "-": if current > new: # type: ignore metrics_data.append( - "{0:n} -> \u001b[{2}m{1:n}\u001b[0m".format( - current, new, BAD_COLORS[metric.measure] - ) + f"{current:n} -> \u001b[{BAD_COLORS[metric.measure]}m{new:n}\u001b[0m" ) elif current < new: # type: ignore metrics_data.append( - "{0:n} -> \u001b[{2}m{1:n}\u001b[0m".format( - current, new, GOOD_COLORS[metric.measure] - ) + f"{current:n} -> \u001b[{GOOD_COLORS[metric.measure]}m{new:n}\u001b[0m" ) else: metrics_data.append(f"{current:n} -> {new:n}")