pylint icon indicating copy to clipboard operation
pylint copied to clipboard

pyreverse: duplicates when using properties getters and setters

Open VasLem opened this issue 3 years ago • 0 comments

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 https://github.com/PyCQA/pylint/issues/83#issuecomment-1203788403

VasLem avatar Aug 03 '22 10:08 VasLem