diff --git a/bumpversion/config/models.py b/bumpversion/config/models.py index 84b8bdf5..8bbdac3c 100644 --- a/bumpversion/config/models.py +++ b/bumpversion/config/models.py @@ -10,11 +10,12 @@ from pydantic_settings import BaseSettings, SettingsConfigDict from bumpversion.ui import get_indented_logger +from bumpversion.versioning.models import VersionComponentConfig # NOQA: TCH001 if TYPE_CHECKING: from bumpversion.scm import SCMInfo from bumpversion.version_part import VersionConfig - from bumpversion.versioning.models import VersionComponentConfig, VersionSpec + from bumpversion.versioning.models import VersionSpec logger = get_indented_logger(__name__) diff --git a/bumpversion/config/utils.py b/bumpversion/config/utils.py index bad3f3fd..08667770 100644 --- a/bumpversion/config/utils.py +++ b/bumpversion/config/utils.py @@ -4,9 +4,8 @@ import glob from typing import Dict, List -from exceptions import BumpVersionError - from bumpversion.config.models import FileChange +from bumpversion.exceptions import BumpVersionError from bumpversion.versioning.models import VersionComponentConfig diff --git a/bumpversion/files.py b/bumpversion/files.py index c630a1f6..5af8f4ed 100644 --- a/bumpversion/files.py +++ b/bumpversion/files.py @@ -6,13 +6,11 @@ from pathlib import Path from typing import Dict, List, MutableMapping, Optional -from versioning.models import VersionComponentConfig - from bumpversion.config.models import FileChange from bumpversion.exceptions import VersionNotFoundError from bumpversion.ui import get_indented_logger from bumpversion.version_part import VersionConfig -from bumpversion.versioning.models import Version +from bumpversion.versioning.models import Version, VersionComponentConfig logger = get_indented_logger(__name__) diff --git a/tests/test_configuredfile.py b/tests/test_configuredfile.py index 258be08f..8eae6ead 100644 --- a/tests/test_configuredfile.py +++ b/tests/test_configuredfile.py @@ -1,7 +1,7 @@ """Tests for the ConfiguredFile class.""" from bumpversion.files import ConfiguredFile, FileChange from bumpversion.version_part import VersionConfig -from versioning.models import VersionComponentConfig +from bumpversion.versioning.models import VersionComponentConfig class TestConfiguredFile: