mirror of
https://github.com/django-components/django-components.git
synced 2025-11-18 06:06:14 +00:00
refactor: in components ext run, display only those extensions that actually have subcommands (#1251)
This commit is contained in:
parent
458e1894db
commit
3fc96daa9b
3 changed files with 19 additions and 13 deletions
|
|
@ -19,6 +19,9 @@ from django_components.util.command import ComponentCommand
|
|||
def _gen_subcommands() -> List[Type[ComponentCommand]]:
|
||||
commands: List[Type[ComponentCommand]] = []
|
||||
for extension in extensions.extensions:
|
||||
if not extension.commands:
|
||||
continue
|
||||
|
||||
ExtCommand = type(
|
||||
"ExtRunSubcommand_" + extension.name,
|
||||
(ComponentCommand,),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue