Commit 81c7d00c by David Hotham Committed by Bjorn Neergaard

not every GroupCommand needs to be an EnvCommand

parent 59a38bd9
......@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING
from cleo.helpers import option
from poetry.core.packages.dependency_group import MAIN_GROUP
from poetry.console.commands.env_command import EnvCommand
from poetry.console.commands.command import Command
if TYPE_CHECKING:
......@@ -13,7 +13,7 @@ if TYPE_CHECKING:
from poetry.core.packages.project_package import ProjectPackage
class GroupCommand(EnvCommand):
class GroupCommand(Command):
@staticmethod
def _group_dependency_options() -> list[Option]:
return [
......
......@@ -2,6 +2,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.console.commands.env_command import EnvCommand
from poetry.console.commands.group_command import GroupCommand
......@@ -9,7 +10,7 @@ if TYPE_CHECKING:
from poetry.installation.installer import Installer
class InstallerCommand(GroupCommand):
class InstallerCommand(GroupCommand, EnvCommand):
def __init__(self) -> None:
# Set in poetry.console.application.Application.configure_installer
self._installer: Installer | None = None
......
......@@ -6,6 +6,7 @@ from cleo.helpers import argument
from cleo.helpers import option
from packaging.utils import canonicalize_name
from poetry.console.commands.env_command import EnvCommand
from poetry.console.commands.group_command import GroupCommand
......@@ -30,7 +31,7 @@ def reverse_deps(pkg: Package, repo: Repository) -> dict[str, str]:
return required_by
class ShowCommand(GroupCommand):
class ShowCommand(GroupCommand, EnvCommand):
name = "show"
description = "Shows information about packages."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment