Update version 1.8.1

This commit is contained in:
Vincent Maillol 2021-03-27 12:34:39 +01:00
parent 145d2fc0f2
commit 7492af5acf
3 changed files with 7 additions and 4 deletions

View File

@ -137,8 +137,11 @@ the List type
.. code-block:: python3
from typing import List
from pydantic import Field
class AccountView(PydanticView):
async def get(self, tags: List[str] = []):
async def get(self, tags: List[str] = Field(default_factory=list)):
...
app = web.Application()

View File

@ -1,5 +1,5 @@
from .view import PydanticView
__version__ = "1.8.0"
__version__ = "1.8.1"
__all__ = ("PydanticView", "__version__")

View File

@ -1,5 +1,5 @@
from typing import Optional, List
from pydantic import Field
from aiohttp import web
from aiohttp_pydantic import PydanticView
@ -11,7 +11,7 @@ class ArticleView(PydanticView):
with_comments: bool,
age: Optional[int] = None,
nb_items: int = 7,
tags: List[str] = [],
tags: List[str] = Field(default_factory=list)
):
return web.json_response(
{