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

Commit a38e135

Browse files
committed
chore: use typing.Tuple for lower python version compatibility
1 parent e4c95a7 commit a38e135

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

databases/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import typing
66
from contextvars import ContextVar
77
from types import TracebackType
8-
from typing import Dict
8+
from typing import Dict, Tuple
99
from urllib.parse import SplitResult, parse_qsl, unquote, urlsplit
1010

1111
from sqlalchemy import text
@@ -39,11 +39,11 @@
3939
# that two database instances in the same task overwrite each other's connections.
4040
# For this reason, key comprises the database instance and the current task.
4141
_connection_contextmap: ContextVar[
42-
Dict[tuple["Database", asyncio.Task], "Connection"]
42+
Dict[Tuple["Database", asyncio.Task], "Connection"]
4343
] = ContextVar("databases:Connection")
4444

4545

46-
def _get_connection_contextmap() -> Dict[tuple["Database", asyncio.Task], "Connection"]:
46+
def _get_connection_contextmap() -> Dict[Tuple["Database", asyncio.Task], "Connection"]:
4747
connections = _connection_contextmap.get(None)
4848
if connections is None:
4949
connections = {}

0 commit comments

Comments
 (0)