One or more?
#185
-
I can't seem to find whether it's possible to require one or more arguments to be consumed. There's only |
Beta Was this translation helpful? Give feedback.
Answered by
DanCardin
Nov 26, 2024
Replies: 1 comment 12 replies
-
There's always class Foo:
foo_required: An[int, Arg(value_name='foo')]
foo_rest: An[list[int], Arg(value_name='foo')]
@property
def foo(self):
return [self.foo_required, *self.foo_rest] I was going to suggest this (but it doesn't work correctly atm, for a reason). class Foo:
foo: An[list[int], Arg(num_args=1, group=Group()), Arg(group=Group())] And there's also As far as a "native" feature, with |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#187