From c7c5cb4a2230e0bc76562b1544f3fdad1a16cf90 Mon Sep 17 00:00:00 2001 From: Dimitrios Theodorakis Date: Wed, 27 Nov 2024 16:37:43 +0000 Subject: [PATCH] Fixes MyPy error in data.py where the exc variable was being overwritten --- metomi/rose/config_editor/data.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/metomi/rose/config_editor/data.py b/metomi/rose/config_editor/data.py index de4525664..c5da5ef77 100644 --- a/metomi/rose/config_editor/data.py +++ b/metomi/rose/config_editor/data.py @@ -534,8 +534,10 @@ def load_optional_configs(self, config_directory): if opt_exceptions: err_text = "" err_format = metomi.rose.config_editor.ERROR_LOAD_OPT_CONFS_FORMAT - for path, exc in sorted(opt_exceptions.items()): - err_text += err_format.format(path, type(exc).__name__, exc) + for path, exception in sorted(opt_exceptions.items()): + err_text += err_format.format( + path, type(exception).__name__, exception + ) err_text = err_text.rstrip() text = metomi.rose.config_editor.ERROR_LOAD_OPT_CONFS.format( err_text