Fix imports

This commit is contained in:
Lonami Exo
2021-09-12 16:23:55 +02:00
parent 01061e0719
commit 5fd2a017b2
11 changed files with 27 additions and 13 deletions

View File

@@ -7,7 +7,7 @@ from collections import defaultdict
from zlib import crc32
from ..sourcebuilder import SourceBuilder
from .._misc.utils import snake_to_camel_case
from ..utils import snake_to_camel_case
AUTO_GEN_NOTICE = \
'"""File generated by TLObjects\' generator. All changes will be ERASED"""'
@@ -61,10 +61,10 @@ def _write_modules(
builder.writeln(AUTO_GEN_NOTICE)
if kind == 'TLObject':
builder.writeln('from .tlobject import TLObject, TLRequest')
builder.writeln('from .._misc.tlobject import TLObject, TLRequest')
builder.writeln('from . import fn')
else:
builder.writeln('from .. import TLObject, TLRequest')
builder.writeln('from ..._misc.tlobject import TLObject, TLRequest')
builder.writeln('from typing import Optional, List, '
'Union, TYPE_CHECKING')