Enable model comparisons
This commit is contained in:
@@ -2,7 +2,7 @@ import attr
|
|||||||
from . import _util
|
from . import _util
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s
|
||||||
class Attachment:
|
class Attachment:
|
||||||
"""Represents a Facebook attachment."""
|
"""Represents a Facebook attachment."""
|
||||||
|
|
||||||
@@ -10,12 +10,12 @@ class Attachment:
|
|||||||
uid = attr.ib(None)
|
uid = attr.ib(None)
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s
|
||||||
class UnsentMessage(Attachment):
|
class UnsentMessage(Attachment):
|
||||||
"""Represents an unsent message attachment."""
|
"""Represents an unsent message attachment."""
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s
|
||||||
class ShareAttachment(Attachment):
|
class ShareAttachment(Attachment):
|
||||||
"""Represents a shared item (e.g. URL) attachment."""
|
"""Represents a shared item (e.g. URL) attachment."""
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ from . import _util
|
|||||||
from ._attachment import Attachment
|
from ._attachment import Attachment
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s
|
||||||
class FileAttachment(Attachment):
|
class FileAttachment(Attachment):
|
||||||
"""Represents a file that has been sent as a Facebook 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):
|
class AudioAttachment(Attachment):
|
||||||
"""Represents an audio file that has been sent as a Facebook 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):
|
class ImageAttachment(Attachment):
|
||||||
"""Represents an image that has been sent as a Facebook 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):
|
class VideoAttachment(Attachment):
|
||||||
"""Represents a video that has been sent as a Facebook attachment."""
|
"""Represents a video that has been sent as a Facebook attachment."""
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ from . import _util, _plan
|
|||||||
from ._thread import ThreadType, Thread
|
from ._thread import ThreadType, Thread
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False, init=False)
|
@attr.s(init=False)
|
||||||
class Group(Thread):
|
class Group(Thread):
|
||||||
"""Represents a Facebook group. Inherits `Thread`."""
|
"""Represents a Facebook group. Inherits `Thread`."""
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ from ._attachment import Attachment
|
|||||||
from . import _util
|
from . import _util
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s
|
||||||
class LocationAttachment(Attachment):
|
class LocationAttachment(Attachment):
|
||||||
"""Represents a user location.
|
"""Represents a user location.
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ class LocationAttachment(Attachment):
|
|||||||
return rtn
|
return rtn
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False, init=False)
|
@attr.s(init=False)
|
||||||
class LiveLocationAttachment(LocationAttachment):
|
class LiveLocationAttachment(LocationAttachment):
|
||||||
"""Represents a live user location."""
|
"""Represents a live user location."""
|
||||||
|
|
||||||
|
@@ -42,7 +42,7 @@ class MessageReaction(Enum):
|
|||||||
NO = "👎"
|
NO = "👎"
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s
|
||||||
class Mention:
|
class Mention:
|
||||||
"""Represents a ``@mention``."""
|
"""Represents a ``@mention``."""
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ class Mention:
|
|||||||
length = attr.ib(10)
|
length = attr.ib(10)
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s
|
||||||
class Message:
|
class Message:
|
||||||
"""Represents a Facebook message."""
|
"""Represents a Facebook message."""
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ from . import _plan
|
|||||||
from ._thread import ThreadType, Thread
|
from ._thread import ThreadType, Thread
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False, init=False)
|
@attr.s(init=False)
|
||||||
class Page(Thread):
|
class Page(Thread):
|
||||||
"""Represents a Facebook page. Inherits `Thread`."""
|
"""Represents a Facebook page. Inherits `Thread`."""
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@ class GuestStatus(Enum):
|
|||||||
DECLINED = 3
|
DECLINED = 3
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s
|
||||||
class Plan:
|
class Plan:
|
||||||
"""Represents a plan."""
|
"""Represents a plan."""
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import attr
|
import attr
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s
|
||||||
class Poll:
|
class Poll:
|
||||||
"""Represents a poll."""
|
"""Represents a poll."""
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ class Poll:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s
|
||||||
class PollOption:
|
class PollOption:
|
||||||
"""Represents a poll option."""
|
"""Represents a poll option."""
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@ import attr
|
|||||||
from ._attachment import Attachment
|
from ._attachment import Attachment
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s
|
||||||
class QuickReply:
|
class QuickReply:
|
||||||
"""Represents a quick reply."""
|
"""Represents a quick reply."""
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ class QuickReply:
|
|||||||
is_response = attr.ib(False)
|
is_response = attr.ib(False)
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False, init=False)
|
@attr.s(init=False)
|
||||||
class QuickReplyText(QuickReply):
|
class QuickReplyText(QuickReply):
|
||||||
"""Represents a text quick reply."""
|
"""Represents a text quick reply."""
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ class QuickReplyText(QuickReply):
|
|||||||
self.image_url = image_url
|
self.image_url = image_url
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False, init=False)
|
@attr.s(init=False)
|
||||||
class QuickReplyLocation(QuickReply):
|
class QuickReplyLocation(QuickReply):
|
||||||
"""Represents a location quick reply (Doesn't work on mobile)."""
|
"""Represents a location quick reply (Doesn't work on mobile)."""
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ class QuickReplyLocation(QuickReply):
|
|||||||
self.is_response = False
|
self.is_response = False
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False, init=False)
|
@attr.s(init=False)
|
||||||
class QuickReplyPhoneNumber(QuickReply):
|
class QuickReplyPhoneNumber(QuickReply):
|
||||||
"""Represents a phone number quick reply (Doesn't work on mobile)."""
|
"""Represents a phone number quick reply (Doesn't work on mobile)."""
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ class QuickReplyPhoneNumber(QuickReply):
|
|||||||
self.image_url = image_url
|
self.image_url = image_url
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False, init=False)
|
@attr.s(init=False)
|
||||||
class QuickReplyEmail(QuickReply):
|
class QuickReplyEmail(QuickReply):
|
||||||
"""Represents an email quick reply (Doesn't work on mobile)."""
|
"""Represents an email quick reply (Doesn't work on mobile)."""
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@ import attr
|
|||||||
from ._attachment import Attachment
|
from ._attachment import Attachment
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False, init=False)
|
@attr.s(init=False)
|
||||||
class Sticker(Attachment):
|
class Sticker(Attachment):
|
||||||
"""Represents a Facebook sticker that has been sent to a thread as an attachment."""
|
"""Represents a Facebook sticker that has been sent to a thread as an attachment."""
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ class ThreadColor(Enum):
|
|||||||
return cls._extend_if_invalid(value)
|
return cls._extend_if_invalid(value)
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False, init=False)
|
@attr.s(init=False)
|
||||||
class Thread:
|
class Thread:
|
||||||
"""Represents a Facebook thread."""
|
"""Represents a Facebook thread."""
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@ class TypingStatus(Enum):
|
|||||||
TYPING = 1
|
TYPING = 1
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False, init=False)
|
@attr.s(init=False)
|
||||||
class User(Thread):
|
class User(Thread):
|
||||||
"""Represents a Facebook user. Inherits `Thread`."""
|
"""Represents a Facebook user. Inherits `Thread`."""
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ class User(Thread):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s
|
||||||
class ActiveStatus:
|
class ActiveStatus:
|
||||||
#: Whether the user is active now
|
#: Whether the user is active now
|
||||||
active = attr.ib(None)
|
active = attr.ib(None)
|
||||||
|
Reference in New Issue
Block a user