Skip to content
This repository was archived by the owner on Jun 21, 2025. It is now read-only.

Commit 2ccfa0a

Browse files
docs: change typing to <3.10 compatible
1 parent a43035d commit 2ccfa0a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/asyncio/asyncio_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import asyncio
22
from datetime import date
3-
from typing import Optional
3+
from typing import Optional, List, Dict
44

55
from pydantic_aioredis import Model
66
from pydantic_aioredis import RedisConfig
@@ -14,7 +14,7 @@ class Book(Model):
1414
author: str
1515
published_on: date
1616
in_stock: bool = True
17-
locations: Optional[list[str]]
17+
locations: Optional[List[str]]
1818

1919

2020
# Do note that there is no concept of relationships here
@@ -23,7 +23,7 @@ class Library(Model):
2323
_primary_key_field: str = "name"
2424
name: str
2525
address: str
26-
details: Optional[dict[str, str]]
26+
details: Optional[Dict[str, str]]
2727

2828

2929
# Redisconfig. Change this configuration to match your redis server

0 commit comments

Comments
 (0)