Use binary semantics when __iadd__ et al are unbound (#13987)
## Summary I noticed that augmented assignments on floats were yielding "not supported" diagnostics. If the dunder isn't bound at all, we should use binary operator semantics, rather than treating it as not-callable.
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
x = 3
|
||||
x -= 1
|
||||
reveal_type(x) # revealed: Literal[2]
|
||||
|
||||
x = 1.0
|
||||
x /= 2
|
||||
reveal_type(x) # revealed: float
|
||||
```
|
||||
|
||||
## Dunder methods
|
||||
|
||||
Reference in New Issue
Block a user