| @@ -3,7 +3,7 @@ import os | |||
| import uuid | |||
| from collections.abc import Generator, Iterable, Sequence | |||
| from itertools import islice | |||
| from typing import TYPE_CHECKING, Any, Optional, Union, cast | |||
| from typing import TYPE_CHECKING, Any, Optional, Union | |||
| import qdrant_client | |||
| import requests | |||
| @@ -398,7 +398,6 @@ class TidbOnQdrantVector(BaseVector): | |||
| def _reload_if_needed(self): | |||
| if isinstance(self._client, QdrantLocal): | |||
| self._client = cast(QdrantLocal, self._client) | |||
| self._client._load() | |||
| @classmethod | |||
| @@ -1,7 +1,7 @@ | |||
| import enum | |||
| import secrets | |||
| from datetime import UTC, datetime, timedelta | |||
| from typing import Any, Optional, cast | |||
| from typing import Any, Optional | |||
| from werkzeug.exceptions import NotFound, Unauthorized | |||
| @@ -42,7 +42,7 @@ class WebAppAuthService: | |||
| if account.password is None or not compare_password(password, account.password, account.password_salt): | |||
| raise AccountPasswordError("Invalid email or password.") | |||
| return cast(Account, account) | |||
| return account | |||
| @classmethod | |||
| def login(cls, account: Account) -> str: | |||