summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAetias <aetias@outlook.com>2025-01-18 13:48:30 +0100
committerAetias <aetias@outlook.com>2025-01-18 13:48:30 +0100
commit311b9243e1fa2ee7ff4992bb7465ef3292f85a7d (patch)
treebbe3fc57a5c04c4b9f798a4f066be20d25c3abe3 /tools
parent2794641461bd5b02d69d0dac0a8d5f102a7ff945 (diff)
Use named arguments in `re` module
Some positional arguments have become deprecated
Diffstat (limited to 'tools')
-rwxr-xr-xtools/m2ctx.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/m2ctx.py b/tools/m2ctx.py
index dc43f326..edac88da 100755
--- a/tools/m2ctx.py
+++ b/tools/m2ctx.py
@@ -37,8 +37,8 @@ COMMENT_REGEX = r'\/\/.*$|\/\*(?:.|\r|\n)+?\*\/'
with open(args.file, 'r') as f:
contents = f.read()
-contents = re.sub(COMMENT_REGEX, '', contents, 0, re.MULTILINE)
-includes = re.findall(INCLUDE_REGEX, contents, re.MULTILINE)
+contents = re.sub(COMMENT_REGEX, '', contents, count=0, flags=re.MULTILINE)
+includes = re.findall(INCLUDE_REGEX, contents, flags=re.MULTILINE)
_, suffix = os.path.splitext(args.file)