From f1a0370328b10d8c87fff9d72b946e59d02a00e6 Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Mon, 22 Jun 2026 11:38:18 +0100 Subject: [PATCH] refactor print --- lfric_macros/apply_macros.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lfric_macros/apply_macros.py b/lfric_macros/apply_macros.py index 439345b3..79dd7078 100755 --- a/lfric_macros/apply_macros.py +++ b/lfric_macros/apply_macros.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python ############################################################################## # (c) Crown copyright 2024 Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms @@ -1036,14 +1036,10 @@ def preprocess_macros(self, nproc: int) -> None: if exception is not None: executor.shutdown(wait=False, cancel_futures=True) raise exception - print( - "[INFO] Processed macro successfully written to " - f"{ - self.parse_application_section( - meta_order[write_tasks.index(task)] - ) - }" + print_val = self.parse_application_section( + meta_order[write_tasks.index(task)] ) + print(f"[INFO] Processed macro successfully written to {print_val}") ############################################################################ # Upgrade Apps Functions