Describe the bug
Currently, typeshed declares DynamicClassAttribute as an alias of property:
DynamicClassAttribute = property
I'd like to update this to define DynamicClassAttribute as it's own class. The new mypy 1.14.0 supports this change, but pyright is generating reportRedeclaration errors when declaring setters and deleters if this change is made.
Code or Screenshots
See the typeshed MR with the change and a test showing the pyright errors: python/typeshed#13276
test case:
class DCAtest:
_value: int | None = None
@types.DynamicClassAttribute
def foo(self) -> int | None:
return self._value
@foo.setter
def foo(self, value: int) -> None:
self._value = value
@foo.deleter
def foo(self) -> None:
self._value = None
Describe the bug
Currently, typeshed declares DynamicClassAttribute as an alias of property:
I'd like to update this to define DynamicClassAttribute as it's own class. The new mypy 1.14.0 supports this change, but pyright is generating
reportRedeclarationerrors when declaring setters and deleters if this change is made.Code or Screenshots
See the typeshed MR with the change and a test showing the pyright errors: python/typeshed#13276
test case: