Open cole-dda opened 1 week ago
class CachedBug: @cached_property def x(self)->int: return 0 @cached_property def y(self)->str: return '' @cached_property def z(self)->Self: return self.__class__() @cached_property def a(self)->'CachedBug': return CachedBug() def usage(): bug = CachedBug() #x is int,ok x = bug.x #y is str,ok y = bug.y #z is Any,not ok z = bug.z #a is CachedBug,ok a = bug.a
pylance can know "z" is CachedBug type
"z" is Any type
XXX
Could someone from the pylance team please transfer this to the pyright project? Thanks!
Environment data
Code Snippet
Repro Steps
Expected behavior
pylance can know "z" is CachedBug type
Actual behavior
"z" is Any type
Logs