Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DynamicEntryPointCommandGroup
: Add support for shared options
The idea for the `DynamicEntryPointCommandGroup` is to easily create a command that has subcommands that are created dynamically based on the entry points that are registered in a certain group. Each entry point would provide the specific CLI options that it would require. However, often there will be shared options that are not specific to any entry point but all of them would require. Here the `shared_options` argument is added to the constructor of the `DynamicEntryPointCommandGroup`. It takes a list of `click.Option` instances and when defined, these options will be added in reverse order after the options of the specific entry point have been added. This ensures that the shared options will be available to all dynamically generated subcommands.
- Loading branch information