From 76fa5fa1ba74c1c0d5caf401b614771d0c989acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Mollier?= Date: Tue, 5 Nov 2024 22:32:30 +0100 Subject: [PATCH] GFFParser.py: fix SyntaxWarning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change treats the regex passed to the compiler as a raw string. This resolve the following warning: /usr/lib/python3/dist-packages/BCBio/GFF/GFFParser.py:71: SyntaxWarning: invalid escape sequence '\w' gff3_kw_pat = re.compile("\w+=") The issue has been initially reported in [Debian bug #1085892]. [Debian bug #1085892]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085892 Signed-off-by: Étienne Mollier --- gff/BCBio/GFF/GFFParser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gff/BCBio/GFF/GFFParser.py b/gff/BCBio/GFF/GFFParser.py index 9d0b93a9..68aca37e 100644 --- a/gff/BCBio/GFF/GFFParser.py +++ b/gff/BCBio/GFF/GFFParser.py @@ -68,7 +68,7 @@ def _merge_keyvals(parts): out.append(p) return out - gff3_kw_pat = re.compile("\w+=") + gff3_kw_pat = re.compile(r"\w+=") def _split_keyvals(keyval_str): """Split key-value pairs in a GFF2, GTF and GFF3 compatible way.