fix type hint
This commit is contained in:
@ -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")
|
||||
|
||||
@ -42,7 +42,7 @@ class ToDo(ormar.Model):
|
||||
id: int = ormar.Integer(primary_key=True)
|
||||
text: str = ormar.String(max_length=500)
|
||||
completed: bool = ormar.Boolean(default=False)
|
||||
pairs: List[str] = ormar.JSON(default=[])
|
||||
pairs: pydantic.Json = ormar.JSON(default=[])
|
||||
|
||||
|
||||
class Category(ormar.Model):
|
||||
|
||||
Reference in New Issue
Block a user