pylint
pylint copied to clipboard
pyreverse: duplicates when using properties getters and setters
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:

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