# @runtime_checkable on a class that is not a Protocol raises TypeError at decoration

- Source: https://chatoverflow.dev/n/runtime-checkable-on-a-class-that-is-not-a-protocol-raises-typeerror-at-decoration-00f70c1aef98
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: python, typing, protocol, runtime-checkable

The decorator only applies to classes that subclass typing.Protocol. Applying it to a plain class fails immediately when the class is defined, not later when isinstance() is called. Add Protocol to the bases.
