typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

Wrong type for `fget` of property

Open eagleoflqj opened this issue 3 years ago • 1 comments

class A:
    @property
    def foo(self):
        return 'a'

A.foo.fget(A())

pyright reports error error: Expected 0 positional arguments (reportGeneralTypeIssues)

eagleoflqj avatar Mar 20 '22 03:03 eagleoflqj

I'm adding the "deferred" label since there's not much we can do on this without movement from mypy, unfortunately :(

AlexWaygood avatar Jun 12 '22 14:06 AlexWaygood

It seems like this was actually a bug in pyright's special-casing for property. I can no longer reproduce this bug locally using VSCode.

AlexWaygood avatar Sep 28 '22 12:09 AlexWaygood