Skip to content

Commit a18e024

Browse files
committed
Fix raw API not being properly imported when using repr/eval
Fixes #423
1 parent 33d04b5 commit a18e024

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

compiler/api/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ def start(format: bool = False):
489489
docstring=docstring,
490490
slots=slots,
491491
id=c.id,
492-
qualname=f"pyrogram.raw.{c.section}.{c.qualname}",
492+
qualname=f"{c.section}.{c.qualname}",
493493
arguments=arguments,
494494
fields=fields,
495495
read_types=read_types,

pyrogram/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ class ContinuePropagation(StopAsyncIteration):
3333
pass
3434

3535

36-
from . import types, filters, handlers, emoji
36+
from . import raw, types, filters, handlers, emoji
3737
from .client import Client
3838
from .sync import idle

pyrogram/raw/core/tl_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __str__(self) -> str:
5353
return dumps(self, indent=4, default=TLObject.default, ensure_ascii=False)
5454

5555
def __repr__(self) -> str:
56-
return "pyrogram.api.{}({})".format(
56+
return "pyrogram.raw.{}({})".format(
5757
self.QUALNAME,
5858
", ".join(
5959
f"{attr}={repr(getattr(self, attr))}"

0 commit comments

Comments
 (0)