Fix raw API not being properly imported when using repr/eval

Fixes #423
This commit is contained in:
Dan 2020-08-30 11:17:20 +02:00
parent 33d04b5916
commit a18e0242fa
3 changed files with 3 additions and 3 deletions

View File

@ -489,7 +489,7 @@ def start(format: bool = False):
docstring=docstring,
slots=slots,
id=c.id,
qualname=f"pyrogram.raw.{c.section}.{c.qualname}",
qualname=f"{c.section}.{c.qualname}",
arguments=arguments,
fields=fields,
read_types=read_types,

View File

@ -33,6 +33,6 @@ class ContinuePropagation(StopAsyncIteration):
pass
from . import types, filters, handlers, emoji
from . import raw, types, filters, handlers, emoji
from .client import Client
from .sync import idle

View File

@ -53,7 +53,7 @@ class TLObject:
return dumps(self, indent=4, default=TLObject.default, ensure_ascii=False)
def __repr__(self) -> str:
return "pyrogram.api.{}({})".format(
return "pyrogram.raw.{}({})".format(
self.QUALNAME,
", ".join(
f"{attr}={repr(getattr(self, attr))}"