Remove explicit new style class declarations
This commit is contained in:
@@ -3,7 +3,7 @@ from . import _util
|
|||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s(cmp=False)
|
||||||
class Attachment(object):
|
class Attachment:
|
||||||
"""Represents a Facebook attachment."""
|
"""Represents a Facebook attachment."""
|
||||||
|
|
||||||
#: The attachment ID
|
#: The attachment ID
|
||||||
|
@@ -20,7 +20,7 @@ ACONTEXT = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class Client(object):
|
class Client:
|
||||||
"""A client for the Facebook Chat (Messenger).
|
"""A client for the Facebook Chat (Messenger).
|
||||||
|
|
||||||
This is the main class of ``fbchat``, which contains all the methods you use to
|
This is the main class of ``fbchat``, which contains all the methods you use to
|
||||||
|
@@ -43,7 +43,7 @@ class MessageReaction(Enum):
|
|||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s(cmp=False)
|
||||||
class Mention(object):
|
class Mention:
|
||||||
"""Represents a ``@mention``."""
|
"""Represents a ``@mention``."""
|
||||||
|
|
||||||
#: The thread ID the mention is pointing at
|
#: The thread ID the mention is pointing at
|
||||||
@@ -55,7 +55,7 @@ class Mention(object):
|
|||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s(cmp=False)
|
||||||
class Message(object):
|
class Message:
|
||||||
"""Represents a Facebook message."""
|
"""Represents a Facebook message."""
|
||||||
|
|
||||||
#: The actual message
|
#: The actual message
|
||||||
|
@@ -10,7 +10,7 @@ class GuestStatus(Enum):
|
|||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s(cmp=False)
|
||||||
class Plan(object):
|
class Plan:
|
||||||
"""Represents a plan."""
|
"""Represents a plan."""
|
||||||
|
|
||||||
#: ID of the plan
|
#: ID of the plan
|
||||||
|
@@ -2,7 +2,7 @@ import attr
|
|||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s(cmp=False)
|
||||||
class Poll(object):
|
class Poll:
|
||||||
"""Represents a poll."""
|
"""Represents a poll."""
|
||||||
|
|
||||||
#: Title of the poll
|
#: Title of the poll
|
||||||
@@ -25,7 +25,7 @@ class Poll(object):
|
|||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s(cmp=False)
|
||||||
class PollOption(object):
|
class PollOption:
|
||||||
"""Represents a poll option."""
|
"""Represents a poll option."""
|
||||||
|
|
||||||
#: Text of the poll option
|
#: Text of the poll option
|
||||||
|
@@ -3,7 +3,7 @@ from ._attachment import Attachment
|
|||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s(cmp=False)
|
||||||
class QuickReply(object):
|
class QuickReply:
|
||||||
"""Represents a quick reply."""
|
"""Represents a quick reply."""
|
||||||
|
|
||||||
#: Payload of the quick reply
|
#: Payload of the quick reply
|
||||||
|
@@ -97,7 +97,7 @@ def _2fa_helper(session, code, r):
|
|||||||
|
|
||||||
|
|
||||||
@attr.s(slots=True) # TODO i Python 3: Add kw_only=True
|
@attr.s(slots=True) # TODO i Python 3: Add kw_only=True
|
||||||
class State(object):
|
class State:
|
||||||
"""Stores and manages state required for most Facebook requests."""
|
"""Stores and manages state required for most Facebook requests."""
|
||||||
|
|
||||||
user_id = attr.ib()
|
user_id = attr.ib()
|
||||||
|
@@ -70,7 +70,7 @@ class ThreadColor(Enum):
|
|||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False, init=False)
|
@attr.s(cmp=False, init=False)
|
||||||
class Thread(object):
|
class Thread:
|
||||||
"""Represents a Facebook thread."""
|
"""Represents a Facebook thread."""
|
||||||
|
|
||||||
#: The unique identifier of the thread. Can be used a ``thread_id``. See :ref:`intro_threads` for more info
|
#: The unique identifier of the thread. Can be used a ``thread_id``. See :ref:`intro_threads` for more info
|
||||||
|
@@ -180,7 +180,7 @@ class User(Thread):
|
|||||||
|
|
||||||
|
|
||||||
@attr.s(cmp=False)
|
@attr.s(cmp=False)
|
||||||
class ActiveStatus(object):
|
class ActiveStatus:
|
||||||
#: Whether the user is active now
|
#: Whether the user is active now
|
||||||
active = attr.ib(None)
|
active = attr.ib(None)
|
||||||
#: Timestamp when the user was last active
|
#: Timestamp when the user was last active
|
||||||
|
Reference in New Issue
Block a user