File: py3.12-fix-SyntaxWarning.patch

package info (click to toggle)
sixer 1.6-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 252 kB
  • sloc: python: 3,037; makefile: 23
file content (17 lines) | stat: -rw-r--r-- 644 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Fix SyntaxWarning
Author: Philippe SERAPHIN <philippe.seraphin@infomaniak.com>
Bug-Debian: https://bugs.debian.org/1058150
Forwarded: no
Last-Update: 2023-12-15

--- sixer-1.6.orig/sixer.py
+++ sixer-1.6/sixer.py
@@ -442,7 +442,7 @@ class Xrange(Operation):
     DOC = "replace xrange() with range() using 'from six import range'"
 
     # 'xrange(' but not 'moves.xrange(' or 'from six.moves import xrange'
-    XRANGE_REGEX = re.compile("(?<!moves\.)xrange *\(")
+    XRANGE_REGEX = re.compile(r"(?<!moves\.)xrange *\(")
     # 'xrange(2)'
     XRANGE1_REGEX = re.compile(r"(?<!moves\.)xrange\(([0-9]+)\)")
     # 'xrange(1, 6)'