Skip to content

Commit cd33247

Browse files
committed
STYLE: Prefer fstrings for readability.
1 parent 83a6625 commit cd33247

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Wrapping/Generators/Python/itk/support/itkBase.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,18 +162,18 @@ def itk_load_swig_module(name, namespace=None):
162162
and current_value != template_container
163163
):
164164
debug_print_error(
165-
"Namespace already has a value for"
166-
" %s, which is not an itkTemplate"
167-
"instance for class %s. "
168-
"Overwriting old value."
169-
% (py_class_name, cpp_class_name)
165+
f"Namespace already has a value for "
166+
f"{py_class_name}, which is not an itkTemplate "
167+
f"instance for class {cpp_class_name}. "
168+
f"Overwriting old value."
170169
)
171170
namespace[py_class_name] = template_container
172171
except Exception as e:
173172
debug_print_error(
174-
"%s not loaded from module %s because of "
175-
"exception:\n %s" % (swig_class_name, name, e)
173+
f"{swig_class_name} not loaded from module {name} because of "
174+
f"exception:\n {e}"
176175
)
176+
pass
177177

178178
else:
179179
# this is a description of a non-templated class

0 commit comments

Comments
 (0)