mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix None datetime being type hinted as invalid
This commit is contained in:
parent
0f10e1419f
commit
1593a4415e
|
@ -249,13 +249,13 @@ class TLArg:
|
|||
'int': 'int',
|
||||
'long': 'int',
|
||||
'string': 'str',
|
||||
'date': 'datetime.datetime',
|
||||
'date': 'datetime.datetime | None', # None date = 0 timestamp
|
||||
'bytes': 'bytes',
|
||||
'true': 'bool',
|
||||
}.get(self.type, 'TLObject')
|
||||
if self.is_vector:
|
||||
result = 'list[{}]'.format(result)
|
||||
if self.is_flag:
|
||||
if self.is_flag and self.type != 'date':
|
||||
result += ' | None'
|
||||
|
||||
return result
|
||||
|
|
Loading…
Reference in New Issue
Block a user