File: use-raw-strings-for-regex.patch

package info (click to toggle)
python-pyvcf 0.6.8%2Bgit20170215.476169c-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,872 kB
  • sloc: python: 2,921; makefile: 126
file content (16 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: use raw strings in regex to prevent invalid escape sequences
Author: Ananthu C V <weepingclown@debian.org>
Bug-Debian: https://bugs.debian.org/1079359
Last-Update: 2024-11-26
--- a/vcf/parser.py
+++ b/vcf/parser.py
@@ -277,3 +277,3 @@
         self._row_pattern = re.compile(self._separator)
-        self._alt_pattern = re.compile('[\[\]]')
+        self._alt_pattern = re.compile(r'[\[\]]')
 
@@ -535,3 +535,3 @@
             orientation = (str[0] == '[' or str[0] == ']')
-            remoteOrientation = (re.search('\[', str) is not None)
+            remoteOrientation = (re.search(r'\[', str) is not None)
             if orientation: