mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-28 00:31:14 +00:00
🔖 Release 2.4.1
Some checks failed
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.10) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.11) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.12) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.9) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.10) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.11) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.12) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.9) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.10) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.11) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.11) (push) Failing after 2s
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.12) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.9) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.10) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.11) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.12) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.9) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.12) (push) Failing after 6m59s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.10) (push) Failing after 7m7s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.10) (push) Failing after 5m14s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.9) (push) Failing after 5m42s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.11) (push) Failing after 4m51s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.12) (push) Failing after 7m12s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.9) (push) Failing after 6m33s
Pyright Lint / Pyright Lint (pydantic-v1) (push) Failing after 8m12s
Ruff Lint / Ruff Lint (push) Successful in 43s
Pyright Lint / Pyright Lint (pydantic-v2) (push) Failing after 6m56s
Site Deploy / publish (push) Failing after 7m21s
Some checks failed
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.10) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.11) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.12) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.9) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.10) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.11) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.12) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.9) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.10) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.11) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.11) (push) Failing after 2s
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.12) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.9) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.10) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.11) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.12) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.9) (push) Waiting to run
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.12) (push) Failing after 6m59s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.10) (push) Failing after 7m7s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.10) (push) Failing after 5m14s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.9) (push) Failing after 5m42s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.11) (push) Failing after 4m51s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.12) (push) Failing after 7m12s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.9) (push) Failing after 6m33s
Pyright Lint / Pyright Lint (pydantic-v1) (push) Failing after 8m12s
Ruff Lint / Ruff Lint (push) Successful in 43s
Pyright Lint / Pyright Lint (pydantic-v2) (push) Failing after 6m56s
Site Deploy / publish (push) Failing after 7m21s
This commit is contained in:
@ -0,0 +1,3 @@
|
||||
{
|
||||
"position": 13
|
||||
}
|
100
website/versioned_docs/version-2.4.1/api/dependencies/index.md
Normal file
100
website/versioned_docs/version-2.4.1/api/dependencies/index.md
Normal file
@ -0,0 +1,100 @@
|
||||
---
|
||||
mdx:
|
||||
format: md
|
||||
sidebar_position: 0
|
||||
description: nonebot.dependencies 模块
|
||||
---
|
||||
|
||||
# nonebot.dependencies
|
||||
|
||||
本模块模块实现了依赖注入的定义与处理。
|
||||
|
||||
## _abstract class_ `Param(*args, validate=False, **kwargs)` {#Param}
|
||||
|
||||
- **说明**
|
||||
|
||||
依赖注入的基本单元 —— 参数。
|
||||
|
||||
继承自 `pydantic.fields.FieldInfo`,用于描述参数信息(不包括参数名)。
|
||||
|
||||
- **参数**
|
||||
|
||||
- `*args`
|
||||
|
||||
- `validate` (bool)
|
||||
|
||||
- `**kwargs` (Any)
|
||||
|
||||
## _class_ `Dependent(<auto>)` {#Dependent}
|
||||
|
||||
- **说明:** 依赖注入容器
|
||||
|
||||
- **参数**
|
||||
|
||||
- `call`: 依赖注入的可调用对象,可以是任何 Callable 对象
|
||||
|
||||
- `pre_checkers`: 依赖注入解析前的参数检查
|
||||
|
||||
- `params`: 具名参数列表
|
||||
|
||||
- `parameterless`: 匿名参数列表
|
||||
|
||||
- `allow_types`: 允许的参数类型
|
||||
|
||||
### _staticmethod_ `parse_params(call, allow_types)` {#Dependent-parse-params}
|
||||
|
||||
- **参数**
|
||||
|
||||
- `call` (\_DependentCallable[R])
|
||||
|
||||
- `allow_types` (tuple[type[Param], ...])
|
||||
|
||||
- **返回**
|
||||
|
||||
- tuple[[ModelField](../compat.md#ModelField), ...]
|
||||
|
||||
### _staticmethod_ `parse_parameterless(parameterless, allow_types)` {#Dependent-parse-parameterless}
|
||||
|
||||
- **参数**
|
||||
|
||||
- `parameterless` (tuple[Any, ...])
|
||||
|
||||
- `allow_types` (tuple[type[Param], ...])
|
||||
|
||||
- **返回**
|
||||
|
||||
- tuple[Param, ...]
|
||||
|
||||
### _classmethod_ `parse(*, call, parameterless=None, allow_types)` {#Dependent-parse}
|
||||
|
||||
- **参数**
|
||||
|
||||
- `call` (\_DependentCallable[R])
|
||||
|
||||
- `parameterless` (Iterable[Any] | None)
|
||||
|
||||
- `allow_types` (Iterable[type[Param]])
|
||||
|
||||
- **返回**
|
||||
|
||||
- Dependent[R]
|
||||
|
||||
### _async method_ `check(**params)` {#Dependent-check}
|
||||
|
||||
- **参数**
|
||||
|
||||
- `**params` (Any)
|
||||
|
||||
- **返回**
|
||||
|
||||
- None
|
||||
|
||||
### _async method_ `solve(**params)` {#Dependent-solve}
|
||||
|
||||
- **参数**
|
||||
|
||||
- `**params` (Any)
|
||||
|
||||
- **返回**
|
||||
|
||||
- dict[str, Any]
|
@ -0,0 +1,48 @@
|
||||
---
|
||||
mdx:
|
||||
format: md
|
||||
sidebar_position: 1
|
||||
description: nonebot.dependencies.utils 模块
|
||||
---
|
||||
|
||||
# nonebot.dependencies.utils
|
||||
|
||||
## _def_ `get_typed_signature(call)` {#get-typed-signature}
|
||||
|
||||
- **说明:** 获取可调用对象签名
|
||||
|
||||
- **参数**
|
||||
|
||||
- `call` ((...) -> Any)
|
||||
|
||||
- **返回**
|
||||
|
||||
- inspect.Signature
|
||||
|
||||
## _def_ `get_typed_annotation(param, globalns)` {#get-typed-annotation}
|
||||
|
||||
- **说明:** 获取参数的类型注解
|
||||
|
||||
- **参数**
|
||||
|
||||
- `param` (inspect.Parameter)
|
||||
|
||||
- `globalns` (dict[str, Any])
|
||||
|
||||
- **返回**
|
||||
|
||||
- Any
|
||||
|
||||
## _def_ `check_field_type(field, value)` {#check-field-type}
|
||||
|
||||
- **说明:** 检查字段类型是否匹配
|
||||
|
||||
- **参数**
|
||||
|
||||
- `field` ([ModelField](../compat.md#ModelField))
|
||||
|
||||
- `value` (Any)
|
||||
|
||||
- **返回**
|
||||
|
||||
- Any
|
Reference in New Issue
Block a user