You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These methods have a generic `type: ignore` with no clarification why.
The issue is we need the ignore here because otherwise `mypy` will give
this error:
> Overloaded operator methods can't have wider argument types in
> overrides
The problem seems to be when the other type implements an
**incompatible** __rmul__ method, which is not the case here, so we
should be safe.
Please see this example:
https://github.com/python/mypy/blob/c26f1297d4f19d2d1124a30efc97caebb8c28616/test-data/unit/check-overloading.test#L4738C1-L4769C55
And a discussion in a mypy issue here:
python/mypy#4985 (comment)
For more information.
This commit uses a more specific `type: ignore[override]` and add a
comment clarifying this.
Signed-off-by: Leandro Lucarella <[email protected]>
0 commit comments