From 2ccfa0a38911e2fce0c6baaa79d3d39a896e2613 Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 8 Sep 2022 08:59:13 -0500 Subject: [PATCH] docs: change typing to <3.10 compatible --- examples/asyncio/asyncio_example.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/asyncio/asyncio_example.py b/examples/asyncio/asyncio_example.py index 263bd0af..68d2dbaf 100644 --- a/examples/asyncio/asyncio_example.py +++ b/examples/asyncio/asyncio_example.py @@ -1,6 +1,6 @@ import asyncio from datetime import date -from typing import Optional +from typing import Optional, List, Dict from pydantic_aioredis import Model from pydantic_aioredis import RedisConfig @@ -14,7 +14,7 @@ class Book(Model): author: str published_on: date in_stock: bool = True - locations: Optional[list[str]] + locations: Optional[List[str]] # Do note that there is no concept of relationships here @@ -23,7 +23,7 @@ class Library(Model): _primary_key_field: str = "name" name: str address: str - details: Optional[dict[str, str]] + details: Optional[Dict[str, str]] # Redisconfig. Change this configuration to match your redis server