test fixes for cli...

This commit is contained in:
deeleeramone
2026-09-27 13:25:00 -07:00
parent c3956de02b
commit d13c712553
2 changed files with 2 additions and 2 deletions

View File

@@ -316,7 +316,7 @@ class ArgparseTranslator:
if origin is list:
return "+"
if origin is Union and any(
if origin in (Union, types.UnionType) and any(
get_origin(arg) is list for arg in get_args(param_type)
):
return "+"

View File

@@ -497,7 +497,7 @@ def test_list_nargs():
actions = {action.dest: action for action in parser._actions}
assert actions["symbols"].nargs == "+"
assert "values" in actions
assert actions["values"].nargs == "+"
def test_custom_type_flattening():