Skip to content

Commit 432d0ed

Browse files
committed
Fixed invalid escape sequence syntax in pattern matching.
1 parent 3441130 commit 432d0ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/generate_api_docs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# Copyright (C) 2024 Raven Computing
2+
# Copyright (C) 2025 Raven Computing
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -303,7 +303,7 @@ def parse_obj_key_list_args(key_lines):
303303
key_lines = [line.strip() for line in key_lines]
304304
key_text = "\n".join(key_lines)
305305
key_list = []
306-
pattern = "(\$\d+|\$\*|\$\@)"
306+
pattern = r"(\$\d+|\$\*|\$\@)"
307307
tokens = list(filter(bool, re.split(pattern, key_text)))
308308
iargs = [i for i, token in enumerate(tokens) if re.match(pattern, token)]
309309
if len(iargs) > 0:
@@ -876,7 +876,7 @@ def get_project_init_version():
876876
if version_str:
877877
version_str = version_str.replace("\n", "")
878878
# Check is valid version string
879-
is_valid = re.match("^[0-9]+\.[0-9]+\.[0-9]+(-dev)?$", version_str)
879+
is_valid = re.match(r"^[0-9]+\.[0-9]+\.[0-9]+(-dev)?$", version_str)
880880
if not is_valid:
881881
warn(f"Invalid version string: '{version_str}'")
882882
_PROJECT_INIT_VERSION = None

0 commit comments

Comments
 (0)