Data classes (annotated with @dataclass) do not use special methods, such as __init__, __gt__, and others.
Non-Compliant Code Examples
@dataclassclass_Leaf(Generic[T]):parent:_Leafvalue:Tdef__init__(self,value:Optional[T]=None):self.value=valueself.parent=selfdefupdate(self,value:T):self.value=valuereturnselfdef__lt__(self,other:_Leaf):returnrepr(self)<repr(other)def__gt__(self,other:_Leaf):returnrepr(self)>repr(other)# __eq__ should not be useddef__eq__(self,other:_Leaf):returnrepr(self)==repr(other)def__repr__(self):returnself.value