Skip to content

General support for properties #220

Description

@JukkaL

Add support for type checking properties.

We should initially support at least the decorator syntax for read-only properties and the assignment syntax for both read-only and read-write properties, as these seem to be the most frequently used variants:

class A:
@property
def foo(self) -> int: return 2
def get_bar(self) -> int: return 3
def set_bar(self, value: int) -> None: ...
bar = property(get_bar, set_bar)

Also support defining a deleter and a docstring, at least when using the call syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions