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
|
# pylint: skip-file
"""
Database of known property names
NOTE: this file is automatically generated by the script
python -Bm cmakelang.tools.parse_cmake_help properties
"""
import re
PATTERNS = [
{%-for pattern in patterns%}
"{{pattern}}",
{%-endfor%}
]
def stripped_patterns():
regex = re.compile(r"\?P<[\w_]+>")
return [regex.sub("", pattern) for pattern in PATTERNS]
CASE_SENSITIVE_REGEX = re.compile(
"|".join(stripped_patterns()))
CASE_INSENSITIVE_REGEX = re.compile(
"|".join(stripped_patterns()), re.IGNORECASE)
|