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 tells me Return type "Bar[T]" of "test" incompatible with return type "Bar[int]" in supertype "Foo" But I cannot understand what it means with Bar[int].
As requested by @ilevkivskyi on gitter, I am adding a comment here.
mypy tells me Return type "Bar[T]" of "test" incompatible with return type "Bar[int]" in supertype "Foo" But I cannot understand what it means with Bar[int].
As requested by @ilevkivskyi on gitter, I am adding a comment here.
@tyrion wondering if there was any progress made on this or if there is a workaround?
Activity
ilevkivskyi commentedon Nov 8, 2016
@JukkaL
I tried to left a (really long) comment here a week ago. But it looks like something went wrong. I suppose I just forgot to press "Comment" :-(
It is difficult to reproduce it again now, but very short summary is: Now I am in favour of option (4) you proposed in #2193 (comment)
gvanrossum commentedon Nov 8, 2016
Agreed.
JukkaL commentedon Nov 30, 2016
The duplicate issue #2511 has a relevant example that has a class method.
tyrion commentedon Aug 22, 2019
The following example seems related to this issue:
mypy tells me
Return type "Bar[T]" of "test" incompatible with return type "Bar[int]" in supertype "Foo"But I cannot understand what it means withBar[int].As requested by @ilevkivskyi on gitter, I am adding a comment here.
slessans commentedon Jan 5, 2021
@tyrion wondering if there was any progress made on this or if there is a workaround?