From 10a4e2d9f210a22ff3ec536b5574dce3e6337df5 Mon Sep 17 00:00:00 2001 From: David Hotham Date: Wed, 31 Aug 2022 19:56:08 +0100 Subject: [PATCH] more compact fix --- src/poetry/plugins/application_plugin.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/poetry/plugins/application_plugin.py b/src/poetry/plugins/application_plugin.py index 4b2c8f905f4..7d9702e694d 100644 --- a/src/poetry/plugins/application_plugin.py +++ b/src/poetry/plugins/application_plugin.py @@ -1,7 +1,5 @@ from __future__ import annotations -import functools - from typing import TYPE_CHECKING from poetry.plugins.base_plugin import BasePlugin @@ -24,12 +22,6 @@ def commands(self) -> list[type[Command]]: return [] def activate(self, application: Application) -> None: - def factory(command: type[Command]) -> Command: - return command() - for command in self.commands: assert command.name is not None - - application.command_loader.register_factory( - command.name, functools.partial(factory, command) - ) + application.command_loader.register_factory(command.name, command)