mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-03-21 18:34:43 +03:00
Remove redundant import, show type instead TLObject on docstring
This commit is contained in:
parent
e3c56b0d98
commit
0e43022959
|
@ -264,7 +264,7 @@ class TLArg:
|
||||||
'date': 'datetime.datetime | None', # None date = 0 timestamp
|
'date': 'datetime.datetime | None', # None date = 0 timestamp
|
||||||
'bytes': 'bytes',
|
'bytes': 'bytes',
|
||||||
'true': 'bool',
|
'true': 'bool',
|
||||||
}.get(self.type, 'TLObject')
|
}.get(self.type, self.type)
|
||||||
if self.is_vector:
|
if self.is_vector:
|
||||||
result = 'list[{}]'.format(result)
|
result = 'list[{}]'.format(result)
|
||||||
if self.is_flag and self.type != 'date':
|
if self.is_flag and self.type != 'date':
|
||||||
|
|
|
@ -146,15 +146,6 @@ class TLGenerator:
|
||||||
x for x in namespace_tlobjects.keys() if x
|
x for x in namespace_tlobjects.keys() if x
|
||||||
)))
|
)))
|
||||||
|
|
||||||
# Import 'get_input_*' utils
|
|
||||||
# TODO Support them on types too
|
|
||||||
if 'functions' in out_dir:
|
|
||||||
builder.writeln(
|
|
||||||
'from {}.utils import get_input_peer, '
|
|
||||||
'get_input_channel, get_input_user, '
|
|
||||||
'get_input_media, get_input_photo'.format('.' * depth)
|
|
||||||
)
|
|
||||||
|
|
||||||
# Import 'os' for those needing access to 'os.urandom()'
|
# Import 'os' for those needing access to 'os.urandom()'
|
||||||
# Currently only 'random_id' needs 'os' to be imported,
|
# Currently only 'random_id' needs 'os' to be imported,
|
||||||
# for all those TLObjects with arg.can_be_inferred.
|
# for all those TLObjects with arg.can_be_inferred.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user