GVSDSDK 的 model_base.py 在 Python 3.10 下不能从 typing 导入 Self,加了兼容:3.11 用标准库,3.10 用 typing_extensions.Self。只动这一处,业务逻辑不变。
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user