Skip to content

How to support the Descriptor Class type check? #132

Open
@GuangTianLi

Description

@GuangTianLi
class Foo:
    def __get__(self, instance, owner) -> str:
        ...
    def __set__(self, instance, value: str) -> None:
        ...
class Test:
   foo = Foo()

test = Test()
test.foo.split() #  Undefined attribute [16]: `Foo` has no attribute `split`.
test.foo = 1 # There should be an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovements and feature requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions