Fix type hints and small bugs

This commit is contained in:
Richard Chien
2018-10-16 01:03:50 +08:00
parent 73e891d521
commit 0046ebacac
12 changed files with 98 additions and 86 deletions

View File

@ -1,13 +1,11 @@
import random
from typing import Union, Sequence, Callable
from typing import Sequence, Callable
from .message import escape
Expression_T = Union[str, Sequence[str], Callable]
from .typing import Expression_T
def render(expr: Expression_T, *, escape_args=True,
**kwargs) -> str:
def render(expr: Expression_T, *, escape_args: bool = True, **kwargs) -> str:
"""
Render an expression to message string.