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)