From 500e438e2bb6a56452a6fdcd71b79ad3282b7982 Mon Sep 17 00:00:00 2001 From: Adel Haddad <26027314+adehad@users.noreply.github.com> Date: Fri, 16 May 2025 11:00:52 +0100 Subject: [PATCH] use raw string to escape regex sequence --- ampy/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ampy/cli.py b/ampy/cli.py index dadd371..96da298 100644 --- a/ampy/cli.py +++ b/ampy/cli.py @@ -50,7 +50,7 @@ def windows_full_port_name(portname): # 9 are just referred to by COM1, COM2, etc. (wacky!) See this post for # more info and where this code came from: # http://eli.thegreenplace.net/2009/07/31/listing-all-serial-ports-on-windows-with-python/ - m = re.match("^COM(\d+)$", portname) + m = re.match(r"^COM(\d+)$", portname) if m and int(m.group(1)) < 10: return portname else: