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:
Charlie Marsh 2024-10-30 09:09:22 -04:00 committed by GitHub
parent 71536a43db
commit 262c04f297
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 28 additions and 26 deletions

View file

@ -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