Fix dropdown[] AST

This commit is contained in:
luk3yx 2019-10-22 16:35:41 +13:00
parent 0427c348dd
commit 1d14900cfb
2 changed files with 5 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -36,14 +36,16 @@ def _fix_param(param):
if ',' not in param:
param = param.lower().strip().strip('<>').replace(' ', '_')
param = _aliases.get(param, param)
assert param != '...'
return (param, _known.get(param, 'string'))
param = param.split(',')
res = []
for p in param:
if p != '...' or not res:
for p in map(str.strip, param):
if p != '...':
res.append(_fix_param(p))
continue
assert res
last = res.pop()
# Workaround