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
Sometimes there's a need to use a typing.Protocol to specify self typing for cases like mixin classes, where the methods aren't there at class definition, but will be there at runtime, once the mixin is inherited from. This generally works fine, except it breaks in one silly case, a short repro of which is available below.
In short, it looks like super doesn't like protocols as it's second argument, which isn't even explicitly passed here.
Activity
henryiii commentedon Sep 28, 2022
FYI, PyLance seems to handle this correctly; I'm not seeing this mypy error in VSCode. MyPy still does this in 0.891.
Allow super() for mixin protocols (#14082)