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
(ignoring that in this contrived, condensed example there is no bar - in my real code there's no such issues and it definitely works as intended at runtime irrespective of mypy's opinions)
Hmm, perhaps my example is missing some pertinent details. In my actual use, bar is a method defined in BaseClass, and foo is overriding the implementation from BaseClass. As such it needs to preserve the method signature of the original method, which is to return an instance of the generic T.
mypy 0.730 newly (vs 0.720) reports the false error:
The text was updated successfully, but these errors were encountered: