diff --git a/crates/ty_python_semantic/resources/mdtest/annotations/cls.md b/crates/ty_python_semantic/resources/mdtest/annotations/cls.md new file mode 100644 index 0000000000..21e2049c8a --- /dev/null +++ b/crates/ty_python_semantic/resources/mdtest/annotations/cls.md @@ -0,0 +1,20 @@ +# `cls` + +```toml +[environment] +python-version = "3.13" +``` + +## Methods + +```py +from typing import Type, Self + +class C: + @classmethod + def make_instance(cls: Type[Self]) -> Self: + return cls() + +reveal_type(C.make_instance()) # revealed: C +reveal_type(C.make_instance) # revealed: bound method .make_instance() -> C +```