File: py313-maxsplit-keyword.patch

package info (click to toggle)
dnarrange 1.5.3-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,768 kB
  • sloc: python: 1,310; sh: 79; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 807 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Colin Watson <cjwatson@debian.org>
Date: Sun, 12 Jan 2025 23:21:11 +0000
Subject: Pass maxsplit as keyword argument

Fixes deprecation warning on Python 3.13.

Forwarded: https://github.com/mcfrith/dnarrange/pull/2
Bug-Debian: https://bugs.debian.org/1092748
Last-Update: 2025-01-12
---
 dnarrange | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dnarrange b/dnarrange
index c9cf81e..2ea1eb8 100755
--- a/dnarrange
+++ b/dnarrange
@@ -558,7 +558,7 @@ def qryNameWithStrand(qryName, isFlipped):
     return newQryName, isAddChar
 
 def printMaf(lines, isFlipped):
-    lines = [re.split(r"(\s+)", i, 5) for i in lines]
+    lines = [re.split(r"(\s+)", i, maxsplit=5) for i in lines]
     sLines = [i for i in lines if i[0] == "s"]
     qryLine = sLines[-1]
     qryName = qryLine[2]