fix type hint

This commit is contained in:
huangsong
2022-01-18 15:55:18 +08:00
parent 51606a6321
commit 9ce61d2269
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ if TYPE_CHECKING: # pragma no cover
from ormar import Model, BaseField
def to_str(val: Union[bytes, str, int]):
def to_str(val: Union[bytes, str, int]) -> str:
""" convert bytes to str simply """
if isinstance(val, bytes):
return val.decode("utf-8")