mirror of
https://github.com/langgenius/dify.git
synced 2026-02-18 13:01:00 -05:00
feat: mypy for all type check (#10921)
This commit is contained in:
@@ -4,11 +4,11 @@ from unittest.mock import MagicMock
|
||||
|
||||
import pytest
|
||||
from _pytest.monkeypatch import MonkeyPatch
|
||||
from pymochow import MochowClient
|
||||
from pymochow.model.database import Database
|
||||
from pymochow.model.enum import IndexState, IndexType, MetricType, ReadConsistency, TableState
|
||||
from pymochow.model.schema import HNSWParams, VectorIndex
|
||||
from pymochow.model.table import Table
|
||||
from pymochow import MochowClient # type: ignore
|
||||
from pymochow.model.database import Database # type: ignore
|
||||
from pymochow.model.enum import IndexState, IndexType, MetricType, ReadConsistency, TableState # type: ignore
|
||||
from pymochow.model.schema import HNSWParams, VectorIndex # type: ignore
|
||||
from pymochow.model.table import Table # type: ignore
|
||||
from requests.adapters import HTTPAdapter
|
||||
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@ from typing import Optional
|
||||
import pytest
|
||||
from _pytest.monkeypatch import MonkeyPatch
|
||||
from requests.adapters import HTTPAdapter
|
||||
from tcvectordb import VectorDBClient
|
||||
from tcvectordb.model.database import Collection, Database
|
||||
from tcvectordb.model.document import Document, Filter
|
||||
from tcvectordb.model.enum import ReadConsistency
|
||||
from tcvectordb.model.index import Index
|
||||
from xinference_client.types import Embedding
|
||||
from tcvectordb import VectorDBClient # type: ignore
|
||||
from tcvectordb.model.database import Collection, Database # type: ignore
|
||||
from tcvectordb.model.document import Document, Filter # type: ignore
|
||||
from tcvectordb.model.enum import ReadConsistency # type: ignore
|
||||
from tcvectordb.model.index import Index # type: ignore
|
||||
from xinference_client.types import Embedding # type: ignore
|
||||
|
||||
|
||||
class MockTcvectordbClass:
|
||||
|
||||
@@ -4,7 +4,7 @@ from unittest.mock import MagicMock
|
||||
|
||||
import pytest
|
||||
from _pytest.monkeypatch import MonkeyPatch
|
||||
from volcengine.viking_db import (
|
||||
from volcengine.viking_db import ( # type: ignore
|
||||
Collection,
|
||||
Data,
|
||||
DistanceType,
|
||||
|
||||
Reference in New Issue
Block a user