Update code generator to emit type hints on init methods

This commit is contained in:
Lonami Exo
2019-05-02 10:19:15 +02:00
parent 3a1496c205
commit fce5cfea0e
3 changed files with 11 additions and 16 deletions

View File

@@ -174,7 +174,7 @@ class TLArg:
'date': 'Optional[datetime]', # None date = 0 timestamp
'bytes': 'bytes',
'true': 'bool',
}.get(cls, "Type{}".format(cls))
}.get(cls, "'Type{}'".format(cls))
if self.is_vector:
result = 'List[{}]'.format(result)
if self.is_flag and cls != 'date':