Add type hints for config items

This commit is contained in:
Richard Chien
2018-10-14 20:32:00 +08:00
parent e59a81858d
commit bc0d7aaa64
4 changed files with 24 additions and 18 deletions

View File

@ -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.