mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-27 16:21:28 +00:00
Add type hints for config items
This commit is contained in:
@ -3,8 +3,10 @@ from typing import Union, Sequence, Callable
|
||||
|
||||
from aiocqhttp import message
|
||||
|
||||
Expression_T = Union[str, Sequence[str], Callable]
|
||||
|
||||
def render(expr: Union[str, Sequence[str], Callable], *, escape_args=True,
|
||||
|
||||
def render(expr: Expression_T, *, escape_args=True,
|
||||
**kwargs) -> str:
|
||||
"""
|
||||
Render an expression to message string.
|
||||
|
Reference in New Issue
Block a user