fix: exclude ( from regex, as well

This commit is contained in:
Mose Müller 2025-05-22 15:06:30 +02:00
parent f6b5c1b567
commit a97b8eb2b4

View File

@ -22,7 +22,7 @@ def reverse_dict(original_dict: dict[str, list[str]]) -> dict[str, list[str]]:
def get_property_dependencies(prop: property, prefix: str = "") -> list[str]:
source_code_string = inspect.getsource(prop.fget) # type: ignore[arg-type]
pattern = r"self\.([^\s\{\}\)]+)"
pattern = r"self\.([^\s\{\}\(\)]+)"
matches = re.findall(pattern, source_code_string)
return [prefix + match for match in matches if "(" not in match]