Skip to content

Return type as type for property methods #9212

@SRFU-NN

Description

@SRFU-NN

Current problem

pyreverse does not give the type for property methods. In the below code example, both b and c should have type int. d() is included to show that it works for methods, just not for property methods.

Run pyreverse on the following code (pyreverse $file --output html):

class A:
    b: int = 1
    
    @property
    def c(self) -> int:
        return 1

    def d(self) -> int:
        return 1

Class diagram in classes.html:

A
----------
b : int
c
----------
d() : int

Desired solution

A
----------
b : int
c : int
----------
d() : int

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🪲Needs PRThis issue is accepted, sufficiently specified and now needs an implementationpyreverseRelated to pyreverse component

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions