[red-knot] Add support for @classmethods (#16305)
## Summary
Add support for `@classmethod`s.
```py
class C:
@classmethod
def f(cls, x: int) -> str:
return "a"
reveal_type(C.f(1)) # revealed: str
```
## Test Plan
New Markdown tests
This commit is contained in:
@@ -70,7 +70,7 @@ def _(m: int, n: int):
|
||||
|
||||
tuple_slice = t[m:n]
|
||||
# TODO: Support overloads... Should be `tuple[Literal[1, 'a', b"b"] | None, ...]`
|
||||
reveal_type(tuple_slice) # revealed: @Todo(return type)
|
||||
reveal_type(tuple_slice) # revealed: @Todo(return type of decorated function)
|
||||
```
|
||||
|
||||
## Inheritance
|
||||
|
||||
Reference in New Issue
Block a user