Return True if target is an attribute access on the instance argument.
(
target: ast.AST, context: EvaluationContext
)
| 739 | |
| 740 | |
| 741 | def _is_instance_attribute_assignment( |
| 742 | target: ast.AST, context: EvaluationContext |
| 743 | ) -> bool: |
| 744 | """Return True if target is an attribute access on the instance argument.""" |
| 745 | return ( |
| 746 | context.class_transients is not None |
| 747 | and context.instance_arg_name is not None |
| 748 | and isinstance(target, ast.Attribute) |
| 749 | and isinstance(getattr(target, "value", None), ast.Name) |
| 750 | and getattr(target.value, "id", None) == context.instance_arg_name |
| 751 | ) |
| 752 | |
| 753 | |
| 754 | def _get_coroutine_attributes() -> dict[str, Optional[object]]: |
no outgoing calls
no test coverage detected
searching dependent graphs…