There was previously a bug with inference handling where nargs=-1 or multuple=True or is_flag should mean not required, but this was not being assessed. Required inference is now much more reliable.
Type inference handling where nargs=-1 or multiple=True now knows to unbox the tuple[foo, ...] to foo. Likewise inference handling for nargs > 1 also knows to unbox tuple types.
Eg: this now works:
@dataclass
class Foo:
bar: Annotated[tuple[int, str], argument(nargs=2)]
There was previously a bug with inference handling where
nargs=-1
ormultuple=True
oris_flag
should mean not required, but this was not being assessed. Required inference is now much more reliable.Type inference handling where
nargs=-1
ormultiple=True
now knows to unbox thetuple[foo, ...]
tofoo
. Likewise inference handling fornargs > 1
also knows to unbox tuple types.Eg: this now works: