DetachHead / basedpyright

pyright fork with various type checking improvements, improved vscode support and pylance features built into the language server
http://docs.basedpyright.com/
Other
613 stars 13 forks source link

can't able to infer type of classmethod when type parameter is used #376

Open KotlinIsland opened 1 month ago

KotlinIsland commented 1 month ago
from typing import *

T = TypeVar("T")

class A(Generic[T]):
    @classmethod
    def f(cls, t: T) -> None:
        print("hi")

a = A.f(1)  # Type of "f" is partially unknown
              #   Type of "f" is "(t: Unknown) -> None"  (reportUnknownMemberType)