4DNucleome / PartSeg

Defining equality for a class without also defining hashability PYL-W1641
Bug risk
Major
5 months ago2 years old
Implementing __eq__ without also implementing __hash__
482        return cls2
483
484
485class ROIExtractionProfile(BaseModel, metaclass=ROIExtractionProfileMeta):  # pylint: disable=E1139486    """
487    :ivar str ~.name: name for segmentation profile
488    :ivar str ~.algorithm: Name of algorithm
Implementing __eq__ without also implementing __hash__
240AlgorithmType = typing.TypeVar("AlgorithmType", bound=typing.Type[AlgorithmDescribeBase])
241
242
243class Register(typing.Dict, typing.Generic[AlgorithmType]):244    """
245    Dict used for register :class:`.AlgorithmDescribeBase` classes.
246    All registers from `PartSeg.PartSegCore.register` are this
Implementing __eq__ without also implementing __hash__
 10
 11
 12@register_class(old_paths=["PartSeg.utils.mask_create.MaskProperty"])
 13class MaskProperty(BaseModel): 14    """
 15    Description of creation mask from segmentation
 16