Commit 30c582d8 by Arun Babu Neelicattu

remove poetry core compat code (MAIN_GROUP)

parent c68011d8
...@@ -7,18 +7,12 @@ from typing import cast ...@@ -7,18 +7,12 @@ from typing import cast
from cleo.helpers import argument from cleo.helpers import argument
from cleo.helpers import option from cleo.helpers import option
from poetry.core.packages.dependency_group import MAIN_GROUP
from tomlkit.toml_document import TOMLDocument from tomlkit.toml_document import TOMLDocument
from poetry.utils.helpers import canonicalize_name
try:
from poetry.core.packages.dependency_group import MAIN_GROUP
except ImportError:
MAIN_GROUP = "default"
from poetry.console.commands.init import InitCommand from poetry.console.commands.init import InitCommand
from poetry.console.commands.installer_command import InstallerCommand from poetry.console.commands.installer_command import InstallerCommand
from poetry.utils.helpers import canonicalize_name
class AddCommand(InstallerCommand, InitCommand): class AddCommand(InstallerCommand, InitCommand):
......
...@@ -3,12 +3,7 @@ from __future__ import annotations ...@@ -3,12 +3,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
from cleo.helpers import option from cleo.helpers import option
from poetry.core.packages.dependency_group import MAIN_GROUP
try:
from poetry.core.packages.dependency_group import MAIN_GROUP
except ImportError:
MAIN_GROUP = "default"
from poetry.console.commands.env_command import EnvCommand from poetry.console.commands.env_command import EnvCommand
......
...@@ -4,17 +4,11 @@ from typing import Any ...@@ -4,17 +4,11 @@ from typing import Any
from cleo.helpers import argument from cleo.helpers import argument
from cleo.helpers import option from cleo.helpers import option
from poetry.core.packages.dependency_group import MAIN_GROUP
from tomlkit.toml_document import TOMLDocument from tomlkit.toml_document import TOMLDocument
from poetry.utils.helpers import canonicalize_name
try:
from poetry.core.packages.dependency_group import MAIN_GROUP
except ImportError:
MAIN_GROUP = "default"
from poetry.console.commands.installer_command import InstallerCommand from poetry.console.commands.installer_command import InstallerCommand
from poetry.utils.helpers import canonicalize_name
class RemoveCommand(InstallerCommand): class RemoveCommand(InstallerCommand):
......
from __future__ import annotations from __future__ import annotations
from poetry.core.packages.dependency_group import MAIN_GROUP
try:
from poetry.core.packages.dependency_group import MAIN_GROUP
except ImportError:
MAIN_GROUP = "default"
from poetry.console.commands.install import InstallCommand from poetry.console.commands.install import InstallCommand
from poetry.console.commands.self.self_command import SelfCommand from poetry.console.commands.self.self_command import SelfCommand
......
...@@ -11,6 +11,7 @@ from typing import cast ...@@ -11,6 +11,7 @@ from typing import cast
from cleo.io.null_io import NullIO from cleo.io.null_io import NullIO
from poetry.core.factory import Factory as BaseFactory from poetry.core.factory import Factory as BaseFactory
from poetry.core.packages.dependency_group import MAIN_GROUP
from poetry.core.packages.project_package import ProjectPackage from poetry.core.packages.project_package import ProjectPackage
from poetry.core.toml.file import TOMLFile from poetry.core.toml.file import TOMLFile
from tomlkit.toml_document import TOMLDocument from tomlkit.toml_document import TOMLDocument
...@@ -22,12 +23,6 @@ from poetry.plugins.plugin_manager import PluginManager ...@@ -22,12 +23,6 @@ from poetry.plugins.plugin_manager import PluginManager
from poetry.poetry import Poetry from poetry.poetry import Poetry
try:
from poetry.core.packages.dependency_group import MAIN_GROUP
except ImportError:
MAIN_GROUP = "default"
if TYPE_CHECKING: if TYPE_CHECKING:
from pathlib import Path from pathlib import Path
......
...@@ -9,11 +9,7 @@ from typing import FrozenSet ...@@ -9,11 +9,7 @@ from typing import FrozenSet
from typing import Tuple from typing import Tuple
from typing import TypeVar from typing import TypeVar
from poetry.core.packages.dependency_group import MAIN_GROUP
try:
from poetry.core.packages.dependency_group import MAIN_GROUP
except ImportError:
MAIN_GROUP = "default"
from poetry.mixology import resolve_version from poetry.mixology import resolve_version
from poetry.mixology.failure import SolveFailure from poetry.mixology.failure import SolveFailure
......
...@@ -5,13 +5,9 @@ from typing import TYPE_CHECKING ...@@ -5,13 +5,9 @@ from typing import TYPE_CHECKING
import pytest import pytest
from poetry.core.masonry.utils.module import ModuleOrPackageNotFound from poetry.core.masonry.utils.module import ModuleOrPackageNotFound
from poetry.core.packages.dependency_group import MAIN_GROUP
try:
from poetry.core.packages.dependency_group import MAIN_GROUP
except ImportError:
MAIN_GROUP = "default"
if TYPE_CHECKING: if TYPE_CHECKING:
from cleo.testers.command_tester import CommandTester from cleo.testers.command_tester import CommandTester
from pytest_mock import MockerFixture from pytest_mock import MockerFixture
......
...@@ -4,14 +4,9 @@ from typing import TYPE_CHECKING ...@@ -4,14 +4,9 @@ from typing import TYPE_CHECKING
import pytest import pytest
from poetry.core.packages.dependency_group import MAIN_GROUP
from poetry.core.packages.dependency_group import DependencyGroup from poetry.core.packages.dependency_group import DependencyGroup
try:
from poetry.core.packages.dependency_group import MAIN_GROUP
except ImportError:
MAIN_GROUP = "default"
from poetry.factory import Factory from poetry.factory import Factory
from tests.helpers import get_package from tests.helpers import get_package
......
...@@ -15,17 +15,12 @@ from cleo.io.null_io import NullIO ...@@ -15,17 +15,12 @@ from cleo.io.null_io import NullIO
from cleo.io.outputs.buffered_output import BufferedOutput from cleo.io.outputs.buffered_output import BufferedOutput
from cleo.io.outputs.output import Verbosity from cleo.io.outputs.output import Verbosity
from deepdiff import DeepDiff from deepdiff import DeepDiff
from poetry.core.packages.dependency_group import MAIN_GROUP
from poetry.core.packages.dependency_group import DependencyGroup from poetry.core.packages.dependency_group import DependencyGroup
from poetry.core.packages.package import Package from poetry.core.packages.package import Package
from poetry.core.packages.project_package import ProjectPackage from poetry.core.packages.project_package import ProjectPackage
from poetry.core.toml.file import TOMLFile from poetry.core.toml.file import TOMLFile
try:
from poetry.core.packages.dependency_group import MAIN_GROUP
except ImportError:
MAIN_GROUP = "default"
from poetry.factory import Factory from poetry.factory import Factory
from poetry.installation import Installer as BaseInstaller from poetry.installation import Installer as BaseInstaller
from poetry.installation.executor import Executor as BaseExecutor from poetry.installation.executor import Executor as BaseExecutor
......
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