Enable model comparisons

This commit is contained in:
Mads Marquart
2019-10-22 20:04:08 +02:00
parent bdd7f69a66
commit ce8711ba65
12 changed files with 25 additions and 25 deletions

View File

@@ -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."""

View File

@@ -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."""

View File

@@ -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`."""

View File

@@ -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."""

View File

@@ -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."""

View File

@@ -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`."""

View File

@@ -10,7 +10,7 @@ class GuestStatus(Enum):
DECLINED = 3
@attr.s(cmp=False)
@attr.s
class Plan:
"""Represents a plan."""

View File

@@ -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."""

View File

@@ -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)."""

View File

@@ -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."""

View File

@@ -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."""

View File

@@ -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)