Chore: remove duplicate TYPE_CHECKING import (#23013)
Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>
This commit is contained in:
@@ -32,7 +32,7 @@ class DatasetDocumentStore:
|
|||||||
}
|
}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def dateset_id(self) -> Any:
|
def dataset_id(self) -> Any:
|
||||||
return self._dataset.id
|
return self._dataset.id
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -123,13 +123,13 @@ class DatasetDocumentStore:
|
|||||||
db.session.flush()
|
db.session.flush()
|
||||||
if save_child:
|
if save_child:
|
||||||
if doc.children:
|
if doc.children:
|
||||||
for postion, child in enumerate(doc.children, start=1):
|
for position, child in enumerate(doc.children, start=1):
|
||||||
child_segment = ChildChunk(
|
child_segment = ChildChunk(
|
||||||
tenant_id=self._dataset.tenant_id,
|
tenant_id=self._dataset.tenant_id,
|
||||||
dataset_id=self._dataset.id,
|
dataset_id=self._dataset.id,
|
||||||
document_id=self._document_id,
|
document_id=self._document_id,
|
||||||
segment_id=segment_document.id,
|
segment_id=segment_document.id,
|
||||||
position=postion,
|
position=position,
|
||||||
index_node_id=child.metadata.get("doc_id"),
|
index_node_id=child.metadata.get("doc_id"),
|
||||||
index_node_hash=child.metadata.get("doc_hash"),
|
index_node_hash=child.metadata.get("doc_hash"),
|
||||||
content=child.page_content,
|
content=child.page_content,
|
||||||
|
@@ -32,9 +32,6 @@ from .engine import db
|
|||||||
from .enums import CreatorUserRole
|
from .enums import CreatorUserRole
|
||||||
from .types import StringUUID
|
from .types import StringUUID
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from .workflow import Workflow
|
|
||||||
|
|
||||||
|
|
||||||
class DifySetup(Base):
|
class DifySetup(Base):
|
||||||
__tablename__ = "dify_setups"
|
__tablename__ = "dify_setups"
|
||||||
|
@@ -42,9 +42,6 @@ from .types import EnumText, StringUUID
|
|||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from models.model import AppMode
|
|
||||||
|
|
||||||
|
|
||||||
class WorkflowType(Enum):
|
class WorkflowType(Enum):
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user