mirror of
https://github.com/tiqi-group/pydase.git
synced 2026-01-02 02:41:19 +01:00
fix: exclude ( from regex, as well
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user