diff --git a/plugins/PostProcessingPlugin/Script.py b/plugins/PostProcessingPlugin/Script.py index be661e0889..bdd57a06e0 100644 --- a/plugins/PostProcessingPlugin/Script.py +++ b/plugins/PostProcessingPlugin/Script.py @@ -122,7 +122,7 @@ class Script: if not key in line or (';' in line and line.find(key) > line.find(';')): return default sub_part = line[line.find(key) + 1:] - m = re.search('^-?[0-9]+\.?[0-9]*', sub_part) + m = re.search(r'^-?[0-9]+\.?[0-9]*', sub_part) if m is None: return default try: diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index f502678317..43df766962 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -338,7 +338,7 @@ class PauseAtHeight(Script): nbr_negative_layers += 1 #Track the latest printing temperature in order to resume at the correct temperature. - if re.match("T(\d*)", line): + if re.match(r"T(\d*)", line): current_t = self.getValue(line, "T") m = self.getValue(line, "M") if m is not None and (m == 104 or m == 109) and self.getValue(line, "S") is not None: diff --git a/plugins/UM3NetworkPrinting/src/ExportFileJob.py b/plugins/UM3NetworkPrinting/src/ExportFileJob.py index ac3da65719..1ab493c747 100644 --- a/plugins/UM3NetworkPrinting/src/ExportFileJob.py +++ b/plugins/UM3NetworkPrinting/src/ExportFileJob.py @@ -28,7 +28,7 @@ class ExportFileJob(WriteFileJob): # Determine the filename. job_name = CuraApplication.getInstance().getPrintInformation().jobName - job_name = re.sub("[^\w\-. ()]", "-", job_name) + job_name = re.sub(r"[^\w\-. ()]", "-", job_name) extension = self._mesh_format_handler.preferred_format.get("extension", "") self.setFileName("{}.{}".format(job_name, extension)) diff --git a/scripts/extract_changelog.py b/scripts/extract_changelog.py index a1a0b251f0..934b963e0a 100644 --- a/scripts/extract_changelog.py +++ b/scripts/extract_changelog.py @@ -13,7 +13,7 @@ if __name__ == "__main__": args.version = args.version[:-2] start_token = f"[{args.version}]" - pattern_stop_log = "\[\d+(\.\d+){1,2}\]" + pattern_stop_log = r"\[\d+(\.\d+){1,2}\]" log_line = False first_chapter = True