diff --git a/fbchat/_attachment.py b/fbchat/_attachment.py index ec48721..afc54fb 100644 --- a/fbchat/_attachment.py +++ b/fbchat/_attachment.py @@ -2,7 +2,7 @@ import attr from . import _util -@attr.s(cmp=False) +@attr.s class Attachment: """Represents a Facebook attachment.""" @@ -10,12 +10,12 @@ class Attachment: uid = attr.ib(None) -@attr.s(cmp=False) +@attr.s class UnsentMessage(Attachment): """Represents an unsent message attachment.""" -@attr.s(cmp=False) +@attr.s class ShareAttachment(Attachment): """Represents a shared item (e.g. URL) attachment.""" diff --git a/fbchat/_file.py b/fbchat/_file.py index 10edf9c..f547138 100644 --- a/fbchat/_file.py +++ b/fbchat/_file.py @@ -3,7 +3,7 @@ from . import _util from ._attachment import Attachment -@attr.s(cmp=False) +@attr.s class FileAttachment(Attachment): """Represents a file that has been sent as a Facebook attachment.""" @@ -29,7 +29,7 @@ class FileAttachment(Attachment): ) -@attr.s(cmp=False) +@attr.s class AudioAttachment(Attachment): """Represents an audio file that has been sent as a Facebook attachment.""" @@ -55,7 +55,7 @@ class AudioAttachment(Attachment): ) -@attr.s(cmp=False, init=False) +@attr.s(init=False) class ImageAttachment(Attachment): """Represents an image that has been sent as a Facebook attachment. @@ -166,7 +166,7 @@ class ImageAttachment(Attachment): ) -@attr.s(cmp=False, init=False) +@attr.s(init=False) class VideoAttachment(Attachment): """Represents a video that has been sent as a Facebook attachment.""" diff --git a/fbchat/_group.py b/fbchat/_group.py index d8eea84..d62c16f 100644 --- a/fbchat/_group.py +++ b/fbchat/_group.py @@ -3,7 +3,7 @@ from . import _util, _plan from ._thread import ThreadType, Thread -@attr.s(cmp=False, init=False) +@attr.s(init=False) class Group(Thread): """Represents a Facebook group. Inherits `Thread`.""" diff --git a/fbchat/_location.py b/fbchat/_location.py index 3a4f2af..b19cdcb 100644 --- a/fbchat/_location.py +++ b/fbchat/_location.py @@ -3,7 +3,7 @@ from ._attachment import Attachment from . import _util -@attr.s(cmp=False) +@attr.s class LocationAttachment(Attachment): """Represents a user location. @@ -53,7 +53,7 @@ class LocationAttachment(Attachment): return rtn -@attr.s(cmp=False, init=False) +@attr.s(init=False) class LiveLocationAttachment(LocationAttachment): """Represents a live user location.""" diff --git a/fbchat/_message.py b/fbchat/_message.py index 329fe85..90f037b 100644 --- a/fbchat/_message.py +++ b/fbchat/_message.py @@ -42,7 +42,7 @@ class MessageReaction(Enum): NO = "👎" -@attr.s(cmp=False) +@attr.s class Mention: """Represents a ``@mention``.""" @@ -54,7 +54,7 @@ class Mention: length = attr.ib(10) -@attr.s(cmp=False) +@attr.s class Message: """Represents a Facebook message.""" diff --git a/fbchat/_page.py b/fbchat/_page.py index 76bbad7..85f8dad 100644 --- a/fbchat/_page.py +++ b/fbchat/_page.py @@ -3,7 +3,7 @@ from . import _plan from ._thread import ThreadType, Thread -@attr.s(cmp=False, init=False) +@attr.s(init=False) class Page(Thread): """Represents a Facebook page. Inherits `Thread`.""" diff --git a/fbchat/_plan.py b/fbchat/_plan.py index 373f8da..8daa86b 100644 --- a/fbchat/_plan.py +++ b/fbchat/_plan.py @@ -10,7 +10,7 @@ class GuestStatus(Enum): DECLINED = 3 -@attr.s(cmp=False) +@attr.s class Plan: """Represents a plan.""" diff --git a/fbchat/_poll.py b/fbchat/_poll.py index 12a29b2..86a7c14 100644 --- a/fbchat/_poll.py +++ b/fbchat/_poll.py @@ -1,7 +1,7 @@ import attr -@attr.s(cmp=False) +@attr.s class Poll: """Represents a poll.""" @@ -24,7 +24,7 @@ class Poll: ) -@attr.s(cmp=False) +@attr.s class PollOption: """Represents a poll option.""" diff --git a/fbchat/_quick_reply.py b/fbchat/_quick_reply.py index 5a9a262..2ae0e2b 100644 --- a/fbchat/_quick_reply.py +++ b/fbchat/_quick_reply.py @@ -2,7 +2,7 @@ import attr from ._attachment import Attachment -@attr.s(cmp=False) +@attr.s class QuickReply: """Represents a quick reply.""" @@ -16,7 +16,7 @@ class QuickReply: is_response = attr.ib(False) -@attr.s(cmp=False, init=False) +@attr.s(init=False) class QuickReplyText(QuickReply): """Represents a text quick reply.""" @@ -33,7 +33,7 @@ class QuickReplyText(QuickReply): self.image_url = image_url -@attr.s(cmp=False, init=False) +@attr.s(init=False) class QuickReplyLocation(QuickReply): """Represents a location quick reply (Doesn't work on mobile).""" @@ -45,7 +45,7 @@ class QuickReplyLocation(QuickReply): self.is_response = False -@attr.s(cmp=False, init=False) +@attr.s(init=False) class QuickReplyPhoneNumber(QuickReply): """Represents a phone number quick reply (Doesn't work on mobile).""" @@ -59,7 +59,7 @@ class QuickReplyPhoneNumber(QuickReply): self.image_url = image_url -@attr.s(cmp=False, init=False) +@attr.s(init=False) class QuickReplyEmail(QuickReply): """Represents an email quick reply (Doesn't work on mobile).""" diff --git a/fbchat/_sticker.py b/fbchat/_sticker.py index a56ce2a..da4dabc 100644 --- a/fbchat/_sticker.py +++ b/fbchat/_sticker.py @@ -2,7 +2,7 @@ import attr from ._attachment import Attachment -@attr.s(cmp=False, init=False) +@attr.s(init=False) class Sticker(Attachment): """Represents a Facebook sticker that has been sent to a thread as an attachment.""" diff --git a/fbchat/_thread.py b/fbchat/_thread.py index 0659257..3011e96 100644 --- a/fbchat/_thread.py +++ b/fbchat/_thread.py @@ -67,7 +67,7 @@ class ThreadColor(Enum): return cls._extend_if_invalid(value) -@attr.s(cmp=False, init=False) +@attr.s(init=False) class Thread: """Represents a Facebook thread.""" diff --git a/fbchat/_user.py b/fbchat/_user.py index 4eb0fbc..83f5939 100644 --- a/fbchat/_user.py +++ b/fbchat/_user.py @@ -41,7 +41,7 @@ class TypingStatus(Enum): TYPING = 1 -@attr.s(cmp=False, init=False) +@attr.s(init=False) class User(Thread): """Represents a Facebook user. Inherits `Thread`.""" @@ -179,7 +179,7 @@ class User(Thread): ) -@attr.s(cmp=False) +@attr.s class ActiveStatus: #: Whether the user is active now active = attr.ib(None)