Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/cygwin-apps/calm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2023-08-15 17:13:17 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2023-08-15 17:56:59 +0300
commitf2764f165b23b2e9ae03849c84fb7ed310ed12b7 (patch)
tree7563061bde0c8db6217ae298e81aa34f82e25b23 /calm/untest.py
parent68e2201f28238209dc58f81a82ba5e3ccdf4d0f5 (diff)
Explicitly use count keyword argument to re.sub()
This avoids flake B034: sub should pass `count` and `flags` as keyword arguments to avoid confusion due to unintuitive argument positions.
Diffstat (limited to 'calm/untest.py')
-rw-r--r--calm/untest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/calm/untest.py b/calm/untest.py
index 7d6d774..7744108 100644
--- a/calm/untest.py
+++ b/calm/untest.py
@@ -53,7 +53,7 @@ def untest(pvr):
content = fh.read()
if re.search(r'^test:', content, re.MULTILINE):
- content = re.sub(r'^test:\s*$', '', content, 0, re.MULTILINE)
+ content = re.sub(r'^test:\s*$', '', content, count=0, flags=re.MULTILINE)
with open(fn, 'w') as fh:
fh.write(content)