From: Roland Mas <lolando@debian.org>
Date: Fri, 24 Oct 2025 18:17:18 +0200
Subject: Fix Python syntax warnings

---
 iotbx/pdb/utils.py                                     |  4 ++--
 xfel/merging/application/errors/error_modifier_mm24.py | 12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/iotbx/pdb/utils.py b/iotbx/pdb/utils.py
index ec2455a..302469b 100644
--- a/iotbx/pdb/utils.py
+++ b/iotbx/pdb/utils.py
@@ -5,7 +5,7 @@ from six.moves import range
 import sys
 
 class generate_n_char_string:
-  """ Iterator to generate strings of length n_chars, using upper-case,
+  r""" Iterator to generate strings of length n_chars, using upper-case,
     lower-case and numbers as desired.
     Allows specialty sets of characters as well
 
@@ -43,7 +43,7 @@ class generate_n_char_string:
     all_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
     all_chars_lc = all_chars.lower()
     all_numbers = '0123456789'
-    special_characters = """[]_,.;:"&<>()\/\{}'`~!@#$%*|+-"""
+    special_characters = r"""[]_,.;:"&<>()\/\{}'`~!@#$%*|+-"""
     self._tilde = """~"""
 
     self._all_everything = ""
diff --git a/xfel/merging/application/errors/error_modifier_mm24.py b/xfel/merging/application/errors/error_modifier_mm24.py
index f2ffa2b..16a8b05 100644
--- a/xfel/merging/application/errors/error_modifier_mm24.py
+++ b/xfel/merging/application/errors/error_modifier_mm24.py
@@ -721,7 +721,7 @@ class error_modifier_mm24(worker):
       fig, axes = plt.subplots(1, 3, figsize=(8, 3))
       axes[0].bar(
         pairwise_differences_centers, pairwise_differences_hist,
-        width=pairwise_differences_db, label='$\omega_{hkl}$'
+        width=pairwise_differences_db, label=r'$\omega_{hkl}$'
         )
       axes[0].plot(
         pairwise_differences_centers,
@@ -736,8 +736,8 @@ class error_modifier_mm24(worker):
           )
 
       axes[0].legend(frameon=False, fontsize=8, handlelength=1)
-      axes[0].set_ylabel('Distribution of $\omega_{hbk}$')
-      axes[0].set_xlabel('Normalized PD ($\omega_{hbk}$)')
+      axes[0].set_ylabel(r'Distribution of $\omega_{hbk}$')
+      axes[0].set_xlabel(r'Normalized PD ($\omega_{hbk}$)')
       axes[0].set_xlim([0, 4.5])
       axes[0].set_xticks([0, 1, 2, 3, 4])
 
@@ -756,7 +756,7 @@ class error_modifier_mm24(worker):
 
       axes[1].set_ylim([0, lim])
       axes[1].set_ylabel('Rankits')
-      axes[1].set_xlabel('Sorted Normalized PD ($\omega_{hbk}$)')
+      axes[1].set_xlabel(r'Sorted Normalized PD ($\omega_{hbk}$)')
       axes[1].set_box_aspect(1)
       axes[1].set_xticks([0, 1, 2, 3, 4])
       axes[1].set_yticks([0, 1, 2, 3, 4])
@@ -775,7 +775,7 @@ class error_modifier_mm24(worker):
       axes[2].plot([x[0], x[-1]], np.sqrt(1 - 2/np.pi) * np.ones(2), color=[0, 0, 0])
       axes[2].plot(x, binned_scale, label='STD')
 
-      axes[2].set_ylabel('Standard Deviation of $I_{hbk}/\sigma_{hbk}$')
+      axes[2].set_ylabel(r'Standard Deviation of $I_{hbk}/\sigma_{hbk}$')
       axes[2].set_xlabel('Mean Intensity X 100,000')
       fig.tight_layout()
       fig.savefig(os.path.join(
@@ -804,7 +804,7 @@ class error_modifier_mm24(worker):
       axes_sadd.plot(centers, self.sfac**2 * sadd2, color=line_color)
       axes_hist.set_xlabel('Correlation Coefficient')
       axes_hist.set_ylabel('Lattices (x1,000)')
-      axes_sadd.set_ylabel('$s_{\mathrm{fac}}^2 \\times s_{\mathrm{add}}^2$')
+      axes_sadd.set_ylabel(r'$s_{\mathrm{fac}}^2 \\times s_{\mathrm{add}}^2$')
       fig.tight_layout()
       fig.savefig(os.path.join(
         self.params.output.output_dir,
