GVSDSDK 的 model_base.py 在 Python 3.10 下不能从 typing 导入 Self,加了兼容:3.11 用标准库,3.10 用 typing_extensions.Self。只动这一处,业务逻辑不变。

This commit is contained in:
XingQue
2026-06-18 09:37:55 +08:00
parent 854c832c07
commit d96381fd4e

View File

@@ -24,7 +24,12 @@
from __future__ import annotations
import re
from typing import Any, Callable, Dict, Generic, Optional, Self, Tuple, Type, TypeVar, Union
from typing import Any, Callable, Dict, Generic, Optional, Tuple, Type, TypeVar, Union
try:
from typing import Self
except ImportError:
from typing_extensions import Self
from django.db import models
from django.db.models import Q