Skip to content

Commit

Permalink
Remove some slots from custom types for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Lonami committed Nov 7, 2023
1 parent 95e1f51 commit ae44426
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions client/src/telethon/_impl/client/types/chat/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class Channel(Chat, metaclass=NoPublicConstructor):
or from methods such as :meth:`telethon.Client.resolve_username`.
"""

__slots__ = ("_raw",)

def __init__(
self,
raw: Union[types.Channel, types.ChannelForbidden],
Expand Down
2 changes: 0 additions & 2 deletions client/src/telethon/_impl/client/types/chat/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ class Chat(abc.ABC):
This will either be a :class:`User`, :class:`Group` or :class:`Channel`.
"""

__slots__ = ()

@property
@abc.abstractmethod
def id(self) -> int:
Expand Down
2 changes: 0 additions & 2 deletions client/src/telethon/_impl/client/types/chat/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class Group(Chat, metaclass=NoPublicConstructor):
or from methods such as :meth:`telethon.Client.resolve_username`.
"""

__slots__ = ("_raw",)

def __init__(
self,
client: Client,
Expand Down
2 changes: 0 additions & 2 deletions client/src/telethon/_impl/client/types/chat/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class User(Chat, metaclass=NoPublicConstructor):
or from methods such as :meth:`telethon.Client.resolve_username`.
"""

__slots__ = ("_raw",)

def __init__(self, raw: types.User) -> None:
self._raw = raw

Expand Down
2 changes: 0 additions & 2 deletions client/src/telethon/_impl/client/types/forward_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ class ForwardInfo(metaclass=NoPublicConstructor):
This is also known as the forward header, as it's often displayed at the top of messages.
"""

__slots__ = ("_code", "_phone")

def __init__(self, code: types.auth.SentCode, phone: str) -> None:
self._code = code
self._phone = phone
Expand Down
2 changes: 0 additions & 2 deletions client/src/telethon/_impl/client/types/link_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ class LinkPreview(metaclass=NoPublicConstructor):
This comes from media attached to a message, and is automatically generated by Telegram.
"""

__slots__ = ("_code", "_phone")

def __init__(self, code: types.auth.SentCode, phone: str) -> None:
self._code = code
self._phone = phone
Expand Down
2 changes: 0 additions & 2 deletions client/src/telethon/_impl/client/types/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ class Message(metaclass=NoPublicConstructor):
or from methods such as :meth:`telethon.Client.get_messages`.
"""

__slots__ = ("_client", "_raw", "_chat_map")

def __init__(
self, client: Client, message: abcs.Message, chat_map: Dict[int, Chat]
) -> None:
Expand Down
2 changes: 0 additions & 2 deletions client/src/telethon/_impl/client/types/recent_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class RecentAction(metaclass=NoPublicConstructor):
You can obtain recent actions with methods such as :meth:`telethon.Client.get_admin_log`.
"""

__slots__ = ("_raw", "_chat_map")

def __init__(
self,
event: abcs.ChannelAdminLogEvent,
Expand Down

0 comments on commit ae44426

Please sign in to comment.