Use named arguments in re module

Some positional arguments have become deprecated
This commit is contained in:
Aetias
2025-01-18 13:48:30 +01:00
parent 2794641461
commit 311b9243e1
+2 -2
View File
@@ -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)