nonebot2/website/versioned_docs/version-2.0.0-rc.1/api/dependencies/utils.md
github-actions[bot] 3234871b53 🔖 Release 2.0.0-rc.1
2022-10-02 08:05:19 +00:00

687 B

sidebar_position description
1 nonebot.dependencies.utils 模块

nonebot.dependencies.utils

def get_typed_signature(call)

  • 说明

    获取可调用对象签名

  • 参数

    • call ((*Any, **Any) -> Any)
  • 返回

    • inspect.Signature

def get_typed_annotation(param, globalns)

  • 说明

    获取参数的类型注解

  • 参数

    • param (inspect.Parameter)

    • globalns (dict[str, Any])

  • 返回

    • Any

def check_field_type(field, value)

  • 参数

    • field (pydantic.fields.ModelField)

    • value ((~ V))

  • 返回

    • (~ V)