Skip to content

pyreverse: duplicates when using properties getters and setters #7261

@VasLem

Description

@VasLem

I have a similar issue, using pylint 2.14.5 and Python 3.8 on this minimal example:

class Block:
    def __init__(self):
        self._cacheDir = None
    @property
    def cacheDir(self):
        if self._cacheDir is None:
            self.cacheDir = cacheDir
        return self._cacheDir

    @cacheDir.setter
    def cacheDir(self, value: str):
        self._cacheDir = value

I get this output:
classes

Is there a way to stop the duplicates from showing up or is this the expected behavior?

Originally posted by @VasLem in #83 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions