Skip to content

Commit

Permalink
Supress import error on 1.8.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ag14774 committed Jan 29, 2025
1 parent c35957a commit e4b5de1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion poetry_monoranger_plugin/path_rewriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from __future__ import annotations

from contextlib import suppress
from typing import TYPE_CHECKING, cast

import poetry.__version__
Expand All @@ -15,9 +16,11 @@
from poetry.core.packages.dependency import Dependency
from poetry.core.packages.dependency_group import MAIN_GROUP
from poetry.core.packages.directory_dependency import DirectoryDependency
from poetry.core.pyproject.exceptions import PyProjectError # type: ignore[attr-defined] # exists only in >=2.0.0
from poetry.core.pyproject.toml import PyProjectTOML

with suppress(ImportError):
from poetry.core.pyproject.exceptions import PyProjectError # type: ignore[attr-defined] # exists only in >=2.0.0

if TYPE_CHECKING:
from cleo.events.console_command_event import ConsoleCommandEvent
from poetry.core.packages.dependency_group import DependencyGroup
Expand Down

0 comments on commit e4b5de1

Please sign in to comment.