From d0430479d79391fd55f2c78871acca52f1e22c79 Mon Sep 17 00:00:00 2001 From: Michael Weinold <23102087+michaelweinold@users.noreply.github.com> Date: Wed, 21 Aug 2024 14:33:38 +0200 Subject: [PATCH] added raw string literals --- bw2io/importers/exiobase3_hybrid.py | 2 +- bw2io/strategies/simapro.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bw2io/importers/exiobase3_hybrid.py b/bw2io/importers/exiobase3_hybrid.py index d9819e8..aa17acc 100644 --- a/bw2io/importers/exiobase3_hybrid.py +++ b/bw2io/importers/exiobase3_hybrid.py @@ -52,7 +52,7 @@ def as_product(o): a["unit"] = p["unit"] # Clean names like 'Collection, purification and distribution of water (41)' - numeric_end = re.compile("\(\d\d\)$") + numeric_end = re.compile(r"\(\d\d\)$") def clean_name(name): suffix = numeric_end.findall(name) diff --git a/bw2io/strategies/simapro.py b/bw2io/strategies/simapro.py index 9205b64..a0153c3 100644 --- a/bw2io/strategies/simapro.py +++ b/bw2io/strategies/simapro.py @@ -605,7 +605,7 @@ def replace_comma(match): formula = formula.replace("^", "**") if settings and settings.get("Decimal separator") == ",": - formula = re.sub("\d,\d", replace_comma, formula) + formula = re.sub(r"\d,\d", replace_comma, formula) formula = fix_iff_formula(formula) return formula