Files
ruff/crates/red_knot_python_semantic/resources/mdtest/stubs/class.md
Alex d77480768d [red-knot] Port type inference tests to new test framework (#13719)
## Summary

Porting infer tests to new markdown tests framework.

Link to the corresponding issue: #13696

---------

Co-authored-by: Carl Meyer <carl@astral.sh>
2024-10-15 11:23:46 -07:00

287 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]