Staging instance, all changes can be removed at any time

Skip to content

Do not automagically add click cmd from swh.cli.subcommands

the idea is now to be a bit more explicit, and expect thoses commands to have the main swh click group as parent.

Then the swh.cli.subcommands entrypoint hooks only have to load the declared cli modules.

So we now expect to:

  • use swh.core.cli.swh as parent group when declaring sub-groups/commands in a swh package.

  • the swh.cli.subcommand entrypoint to only refer the module rather than the click group/command, ie. have:

    ''' [swh.cli.subcommands] name = swh.path.to.cli_module '''

    instead of:

    ''' [swh.cli.subcommands] name = swh.path.to.cli_module:click_command '''

A backward compatilibility mech is provided: if the loaded entrypoint object is indeed a click command, auto add it to the main swh group.


Migrated from D3930 (view on Phabricator)

Merge request reports

Loading