File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 33
44import logging
55
6+ from typing import TYPE_CHECKING
67from typing import Any
78from typing import Dict
89from typing import List
1314from .json import validate_object
1415from .packages .dependency import Dependency
1516from .packages .project_package import ProjectPackage
16- from .poetry import Poetry
1717from .pyproject import PyProjectTOML
1818from .spdx import license_by_id
1919from .utils ._compat import Path
2020
2121
22+ if TYPE_CHECKING :
23+ from poetry .core .poetry import Poetry # noqa
24+
25+
2226logger = logging .getLogger (__name__ )
2327
2428
@@ -27,7 +31,9 @@ class Factory(object):
2731 Factory class to create various elements needed by Poetry.
2832 """
2933
30- def create_poetry (self , cwd = None ): # type: (Optional[Path]) -> Poetry
34+ def create_poetry (self , cwd = None ): # type: (Optional[Path]) -> "Poetry"
35+ from poetry .core .poetry import Poetry # noqa
36+
3137 poetry_file = self .locate (cwd )
3238 local_config = PyProjectTOML (path = poetry_file ).poetry_config
3339
You can’t perform that action at this time.
0 commit comments