mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Add repr to updates session types for easier debugging
This commit is contained in:
parent
001df933a5
commit
7963af1d17
|
@ -41,6 +41,9 @@ class SessionState:
|
||||||
self.seq = seq
|
self.seq = seq
|
||||||
self.takeout_id = takeout_id
|
self.takeout_id = takeout_id
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return repr({k: getattr(self, k) for k in self.__slots__})
|
||||||
|
|
||||||
|
|
||||||
class ChannelState:
|
class ChannelState:
|
||||||
"""
|
"""
|
||||||
|
@ -59,6 +62,9 @@ class ChannelState:
|
||||||
self.channel_id = channel_id
|
self.channel_id = channel_id
|
||||||
self.pts = pts
|
self.pts = pts
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return repr({k: getattr(self, k) for k in self.__slots__})
|
||||||
|
|
||||||
|
|
||||||
class EntityType(IntEnum):
|
class EntityType(IntEnum):
|
||||||
"""
|
"""
|
||||||
|
@ -184,3 +190,6 @@ class Entity:
|
||||||
return InputPeerChat(self.id)
|
return InputPeerChat(self.id)
|
||||||
else:
|
else:
|
||||||
return InputPeerChannel(self.id, self.hash)
|
return InputPeerChannel(self.id, self.hash)
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return repr({k: getattr(self, k) for k in self.__slots__})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user