[mypyc] Use `other` arg instead of `self` for RHS type (#21569)
Fixes #21568 In `gen_glue_ne_method`, mypyc currently chooses the generated RHS argument type like this when strict dunder typing is enabled: ```python rhs_type = eq_sig.args[0].type if strict_typing else object_rprimitive ``` However, the `__eq__` signature includes `self`, so `eq_sig.args[0]` is the type of `self`, not the type of `other`. --------- Co-authored-by: Piotr Sawicki <sawickipiotr@outlook.com>
R
Ryan Heard committed
cd75c4ec10254f4c98964308a0a1437274c7be4f
Parent: 70b74e1
Committed by GitHub <noreply@github.com>
on 6/1/2026, 3:09:48 PM