ruff
39ff33cf - [ty] Preserve property getter call errors (#27509)

Commit
83 days ago
[ty] Preserve property getter call errors (#27509) ## Summary Previously, a failed property getter call was flattened into `call-non-callable: calling the getter failed`, and its declared return type was discarded: ```python class Example: @property def value(self) -> int: return 1 reveal_type(Example.value.__get__("wrong", Example)) # error: [invalid-argument-type] Expected `Example`, found `Literal["wrong"]` # revealed: int ``` We now preserve the getter's original call bindings and recovery type, reusing the structured accessor-error handling already used for property setters. This applies to both bound `prop.__get__(instance, owner)` and unbound `property.__get__(prop, instance, owner)` calls, with diagnostics attached to the actual instance argument.
Author
Parents
Loading