(
expression: ast.Attribute,
state: dict[str, Any],
static_tools: dict[str, Callable],
custom_tools: dict[str, Callable],
authorized_imports: list[str],
)
| 381 | |
| 382 | |
| 383 | def evaluate_attribute( |
| 384 | expression: ast.Attribute, |
| 385 | state: dict[str, Any], |
| 386 | static_tools: dict[str, Callable], |
| 387 | custom_tools: dict[str, Callable], |
| 388 | authorized_imports: list[str], |
| 389 | ) -> Any: |
| 390 | if expression.attr.startswith("__") and expression.attr.endswith("__"): |
| 391 | raise InterpreterError(f"Forbidden access to dunder attribute: {expression.attr}") |
| 392 | value = evaluate_ast(expression.value, state, static_tools, custom_tools, authorized_imports) |
| 393 | return getattr(value, expression.attr) |
| 394 | |
| 395 | |
| 396 | def evaluate_unaryop( |
no test coverage detected
searching dependent graphs…