-
Notifications
You must be signed in to change notification settings - Fork 853
Closed
Labels
Version: 3xenhancementM-T: A feature request for new functionalityM-T: A feature request for new functionalitygood first issueweb-client
Milestone
Description
Reproducible in:
The Slack SDK version
All versions
Steps to reproduce:
from slack_sdk.models.blocks import DividerBlock
DividerBlock() == DividerBlock()It happens with any pair of equivalent blocks.
Expected result:
True
Actual result:
False
Suggested solution
Implementing __eq__ in JsonObject.
class JsonObject(BaseObject, metaclass=ABCMeta):
...
def __eq__(self, other: Any) -> bool:
if not isinstance(other, JsonObject):
return NotImplemented
return self.to_dict() == other.to_dict()This would allow testing user functions that accept and/or return Slack SDK models.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Version: 3xenhancementM-T: A feature request for new functionalityM-T: A feature request for new functionalitygood first issueweb-client