aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/picmi.py
diff options
context:
space:
mode:
authorGravatar Kevin Z. Zhu <86268612+KZhu-ME@users.noreply.github.com> 2021-11-02 17:47:59 -0700
committerGravatar GitHub <noreply@github.com> 2021-11-02 17:47:59 -0700
commitb1ab47fa7568cba2c358cd14bbe1e68f13449be4 (patch)
tree890e705a3edf18f90b038cc09f1a8a7cab14a312 /Python/pywarpx/picmi.py
parent55e5528cfebd958ba341a059f01bdde4ea288e61 (diff)
downloadWarpX-b1ab47fa7568cba2c358cd14bbe1e68f13449be4.tar.gz
WarpX-b1ab47fa7568cba2c358cd14bbe1e68f13449be4.tar.zst
WarpX-b1ab47fa7568cba2c358cd14bbe1e68f13449be4.zip
Change regex string to raw string (#2519)
Diffstat (limited to 'Python/pywarpx/picmi.py')
-rw-r--r--Python/pywarpx/picmi.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py
index ef2371699..741ae6e6e 100644
--- a/Python/pywarpx/picmi.py
+++ b/Python/pywarpx/picmi.py
@@ -61,7 +61,7 @@ class Species(picmistandard.PICMI_Species):
else:
self.charge = self.charge_state*constants.q_e
# Match a string of the format '#nXx', with the '#n' optional isotope number.
- m = re.match('(?P<iso>#[\d+])*(?P<sym>[A-Za-z]+)', self.particle_type)
+ m = re.match(r'(?P<iso>#[\d+])*(?P<sym>[A-Za-z]+)', self.particle_type)
if m is not None:
element = periodictable.elements.symbol(m['sym'])
if m['iso'] is not None: