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
Mypy 0.940 got a more precise type for @asynccontextmanager, and this resulted in apparent false positives:
tp.py:14: error: Overloaded function implementation cannot produce return type of signature 1
tp.py:14: error: Overloaded function implementation cannot produce return type of signature 2
I think that we can allow an overload item to have a more general return type than the implementation, for convenience.
The text was updated successfully, but these errors were encountered:
A wider return type can be useful if a decorator used for the overload
implementation gets a more precise return type as part of a typeshed
update.
Closes#12434.
A wider return type can be useful if a decorator used for the overload
implementation gets a more precise return type as part of a typeshed
update.
Closes#12434.
A wider return type can be useful if a decorator used for the overload
implementation gets a more precise return type as part of a typeshed
update.
Closes#12434.
A wider return type can be useful if a decorator gets a more precise error type as part of a typeshed update.
@wrobell reported this concrete example in #12021 (comment):
Mypy 0.940 got a more precise type for
@asynccontextmanager
, and this resulted in apparent false positives:I think that we can allow an overload item to have a more general return type than the implementation, for convenience.
The text was updated successfully, but these errors were encountered: