Files
ruff/crates/red_knot_python_semantic/resources/mdtest/stubs/class.md
Carl Meyer b8acadd6a2 [red-knot] have mdformat wrap mdtest files to 100 columns (#14020)
This makes it easier to read and edit (and review changes to) these
files as source, even though it doesn't affect the rendering.
2024-10-31 21:00:51 +00:00

288 B

Class defenitions in stubs

Cyclical class definition

In type stubs, classes can reference themselves in their base class definitions. For example, in typeshed, we have class str(Sequence[str]): ....

class C(C): ...

reveal_type(C)  # revealed: Literal[C]