[ty] Improve diagnostics for unsupported binary operations and unsupported augmented assignments (#21947)

## Summary

This PR takes the improvements we made to unsupported-comparison
diagnostics in https://github.com/astral-sh/ruff/pull/21737, and extends
them to other `unsupported-operator` diagnostics.

## Test Plan

Mdtests and snapshots
This commit is contained in:
Alex Waygood
2025-12-12 21:53:29 +00:00
committed by GitHub
parent ca5f099481
commit 5a2aba237b
15 changed files with 401 additions and 107 deletions

View File

@@ -38,6 +38,8 @@ reveal_type(x) # revealed: int
## Unsupported types
<!-- snapshot-diagnostics -->
```py
class C:
def __isub__(self, other: str) -> int: