Use raw strings for regular expressions with invalid escape sequences

If "T(\d*)" was "T(\n*)" it would search for newlines.  There isn't
any such \d escape character.

It should be "T(\\d*)" or r"T(\d*)" going with the latter, to be
easier to read and be consistent with other Cura usage.

Start python with -Wd or for python 3.12 will raise a SyntaxWarning.
This commit is contained in:
David Fries 2024-08-30 18:20:52 -05:00
parent 38695d9572
commit 6e3e3e6742
4 changed files with 4 additions and 4 deletions

View file

@ -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