imbajin commented on code in PR #304:
URL:
https://github.com/apache/incubator-hugegraph-ai/pull/304#discussion_r2465635396
##########
hugegraph-llm/src/hugegraph_llm/flows/get_graph_index_info.py:
##########
@@ -49,22 +43,20 @@ def build_flow(self, **kwargs):
return pipeline
def post_deal(self, pipeline=None):
+ # Lazy import to avoid circular dependency
+ from hugegraph_llm.utils.vector_index_utils import
get_vector_index_class # pylint: disable=import-outside-toplevel
Review Comment:
🧹 **Import 顺序**: 这里有一个延迟导入(lazy import)来避免循环依赖,但注释说明不够清晰。
```python
# Lazy import to avoid circular dependency
from hugegraph_llm.utils.vector_index_utils import get_vector_index_class #
pylint: disable=import-outside-toplevel
```
建议:
1. 在模块文档中说明为什么需要延迟导入
2. 考虑重构模块结构以避免循环依赖,这通常是设计问题的信号
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]