nonebot2/nonebot/utils.py

207 lines
5.4 KiB
Python
Raw Normal View History

2022-01-19 16:16:56 +08:00
"""本模块包含了 NoneBot 的一些工具函数
2022-01-16 11:30:09 +08:00
FrontMatter:
sidebar_position: 8
description: nonebot.utils 模块
"""
2020-09-30 18:01:31 +08:00
import re
2020-08-10 13:06:02 +08:00
import json
2020-08-14 17:41:24 +08:00
import asyncio
import inspect
2020-08-10 13:06:02 +08:00
import dataclasses
from pathlib import Path
2020-08-14 17:41:24 +08:00
from functools import wraps, partial
from contextlib import asynccontextmanager
from typing_extensions import ParamSpec, get_args, get_origin
from typing import (
Any,
Type,
Tuple,
Union,
TypeVar,
Callable,
Optional,
2022-02-11 11:25:31 +08:00
Coroutine,
AsyncGenerator,
ContextManager,
overload,
)
2020-08-10 13:06:02 +08:00