📝 构建文档测试

This commit is contained in:
远野千束 2024-08-29 15:12:49 +08:00
parent 3c9acbc82d
commit a6ddc8e5bd

View File

@ -10,24 +10,24 @@ Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
""" """
from typing import Callable, Iterable, TypeAlias, TypeVar from typing import Callable, Iterable, TypeAlias, TypeVar
RealNumber: TypeAlias = int | float RealNumber: TypeAlias = int | float # 实数
Number: TypeAlias = RealNumber | complex Number: TypeAlias = RealNumber | complex # 数
SingleVar = TypeVar("SingleVar", bound=Number) SingleVar = TypeVar("SingleVar", bound=Number) # 单变量
ArrayVar = TypeVar("ArrayVar", bound=Iterable[Number]) ArrayVar = TypeVar("ArrayVar", bound=Iterable[Number]) # 数组变量
Var: TypeAlias = SingleVar | ArrayVar Var: TypeAlias = SingleVar | ArrayVar # 变量
OneSingleVarFunc: TypeAlias = Callable[[SingleVar], SingleVar] OneSingleVarFunc: TypeAlias = Callable[[SingleVar], SingleVar] # 一元单变量函数
OneArrayFunc: TypeAlias = Callable[[ArrayVar], ArrayVar] OneArrayFunc: TypeAlias = Callable[[ArrayVar], ArrayVar] # 一元数组函数
OneVarFunc: TypeAlias = OneSingleVarFunc | OneArrayFunc OneVarFunc: TypeAlias = OneSingleVarFunc | OneArrayFunc # 一元函数
TwoSingleVarsFunc: TypeAlias = Callable[[SingleVar, SingleVar], SingleVar] TwoSingleVarsFunc: TypeAlias = Callable[[SingleVar, SingleVar], SingleVar] # 二元单变量函数
TwoArraysFunc: TypeAlias = Callable[[ArrayVar, ArrayVar], ArrayVar] TwoArraysFunc: TypeAlias = Callable[[ArrayVar, ArrayVar], ArrayVar] # 二元数组函数
TwoVarsFunc: TypeAlias = TwoSingleVarsFunc | TwoArraysFunc TwoVarsFunc: TypeAlias = TwoSingleVarsFunc | TwoArraysFunc # 二元函数
ThreeSingleVarsFunc: TypeAlias = Callable[[SingleVar, SingleVar, SingleVar], SingleVar] ThreeSingleVarsFunc: TypeAlias = Callable[[SingleVar, SingleVar, SingleVar], SingleVar] # 三元单变量函数
ThreeArraysFunc: TypeAlias = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar] ThreeArraysFunc: TypeAlias = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar] # 三元数组函数
ThreeVarsFunc: TypeAlias = ThreeSingleVarsFunc | ThreeArraysFunc ThreeVarsFunc: TypeAlias = ThreeSingleVarsFunc | ThreeArraysFunc # 三元函数
MultiSingleVarsFunc: TypeAlias = Callable[..., SingleVar] MultiSingleVarsFunc: TypeAlias = Callable[..., SingleVar] # 多元单变量函数
MultiArraysFunc: TypeAlias = Callable[..., ArrayVar] MultiArraysFunc: TypeAlias = Callable[..., ArrayVar] # 多元数组函数
MultiVarsFunc: TypeAlias = MultiSingleVarsFunc | MultiArraysFunc MultiVarsFunc: TypeAlias = MultiSingleVarsFunc | MultiArraysFunc # 多元函数