Bug report
Bug description:
I would expect this to raise, but it passes on all versions:
fromtypingimportruntime_checkable, Protocol@runtime_checkableclassFoo(Protocol):
x: intclassBar(Foo, Protocol):
y: strisinstance(object(), Bar)
Some previous discussion in #132596 (comment) . We may not want to change this behavior for compatibility reasons, but I think it's a bug so I'm at least opening the issue.
CPython versions tested on:
CPython main branch, 3.13
Operating systems tested on:
macOS
Linked PRs
Bug report
Bug description:
I would expect this to raise, but it passes on all versions:
Some previous discussion in #132596 (comment) . We may not want to change this behavior for compatibility reasons, but I think it's a bug so I'm at least opening the issue.
CPython versions tested on:
CPython main branch, 3.13
Operating systems tested on:
macOS
Linked PRs