-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Hi!
In my current project, I have my own subclass of click.Command
where I pre-initialise a bunch of options in self.params
.
class MyCommand(click.Command):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.params = [
click.Option(("-a", "--A"), ...),
click.Option(("-b", "--B"), ...),
click.Option(("-c", "--C"), ...),
] + self.params
This list takes param objects and I was wondering if it's possible to instantiate an option group in this fashion without using the decorators? Have been peeking at the source here but wasn't able to find a way
Thanks!
ghisvail
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed