Remove some slots from custom types for consistency

#4239.
This commit is contained in:
Lonami Exo 2023-11-07 12:37:30 +01:00
parent 95e1f5115c
commit ae44426a78
8 changed files with 0 additions and 16 deletions

View File

@ -14,8 +14,6 @@ class Channel(Chat, metaclass=NoPublicConstructor):
or from methods such as :meth:`telethon.Client.resolve_username`. or from methods such as :meth:`telethon.Client.resolve_username`.
""" """
__slots__ = ("_raw",)
def __init__( def __init__(
self, self,
raw: Union[types.Channel, types.ChannelForbidden], raw: Union[types.Channel, types.ChannelForbidden],

View File

@ -11,8 +11,6 @@ class Chat(abc.ABC):
This will either be a :class:`User`, :class:`Group` or :class:`Channel`. This will either be a :class:`User`, :class:`Group` or :class:`Channel`.
""" """
__slots__ = ()
@property @property
@abc.abstractmethod @abc.abstractmethod
def id(self) -> int: def id(self) -> int:

View File

@ -21,8 +21,6 @@ class Group(Chat, metaclass=NoPublicConstructor):
or from methods such as :meth:`telethon.Client.resolve_username`. or from methods such as :meth:`telethon.Client.resolve_username`.
""" """
__slots__ = ("_raw",)
def __init__( def __init__(
self, self,
client: Client, client: Client,

View File

@ -14,8 +14,6 @@ class User(Chat, metaclass=NoPublicConstructor):
or from methods such as :meth:`telethon.Client.resolve_username`. or from methods such as :meth:`telethon.Client.resolve_username`.
""" """
__slots__ = ("_raw",)
def __init__(self, raw: types.User) -> None: def __init__(self, raw: types.User) -> None:
self._raw = raw self._raw = raw

View File

@ -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. 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: def __init__(self, code: types.auth.SentCode, phone: str) -> None:
self._code = code self._code = code
self._phone = phone self._phone = phone

View File

@ -11,8 +11,6 @@ class LinkPreview(metaclass=NoPublicConstructor):
This comes from media attached to a message, and is automatically generated by Telegram. 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: def __init__(self, code: types.auth.SentCode, phone: str) -> None:
self._code = code self._code = code
self._phone = phone self._phone = phone

View File

@ -42,8 +42,6 @@ class Message(metaclass=NoPublicConstructor):
or from methods such as :meth:`telethon.Client.get_messages`. or from methods such as :meth:`telethon.Client.get_messages`.
""" """
__slots__ = ("_client", "_raw", "_chat_map")
def __init__( def __init__(
self, client: Client, message: abcs.Message, chat_map: Dict[int, Chat] self, client: Client, message: abcs.Message, chat_map: Dict[int, Chat]
) -> None: ) -> None:

View File

@ -14,8 +14,6 @@ class RecentAction(metaclass=NoPublicConstructor):
You can obtain recent actions with methods such as :meth:`telethon.Client.get_admin_log`. You can obtain recent actions with methods such as :meth:`telethon.Client.get_admin_log`.
""" """
__slots__ = ("_raw", "_chat_map")
def __init__( def __init__(
self, self,
event: abcs.ChannelAdminLogEvent, event: abcs.ChannelAdminLogEvent,