mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-24777 allow tuples for optparse arguments
This commit is contained in:
@@ -17,6 +17,6 @@ def get_opt_type(opt):
|
||||
if opt.type in ["int", "long"]:
|
||||
return "int"
|
||||
elif opt.choices:
|
||||
assert isinstance(opt.choices, list), "Choices should be list"
|
||||
assert isinstance(opt.choices, (list, tuple)), "Choices should be list or tuple"
|
||||
return opt.choices
|
||||
return "str"
|
||||
|
||||
Reference in New Issue
Block a user