Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit 1ced20d

Browse files
committed
restore old generic syntax for connect.py
1 parent 26619a9 commit 1ced20d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

localstack-core/localstack/aws/connect.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from functools import lru_cache, partial
1616
from random import choice
1717
from socket import socket
18-
from typing import Any, TypedDict
18+
from typing import Any, Generic, TypedDict, TypeVar
1919

2020
import dns.message
2121
import dns.query
@@ -165,7 +165,10 @@ def load_dto(data: str) -> InternalRequestParameters:
165165
return json.loads(data)
166166

167167

168-
class MetadataRequestInjector[T]:
168+
T = TypeVar("T")
169+
170+
171+
class MetadataRequestInjector(Generic[T]):
169172
def __init__(self, client: T, params: dict[str, str] | None = None):
170173
self._client = client
171174
self._params = params

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ exclude = [
211211
"localstack-core/localstack/constants.py" = "py310"
212212
"localstack-core/localstack/utils/**" = "py310" # imported by CLI tests
213213
"localstack-core/localstack/testing/pytest/**" = "py310" # imported by CLI tests
214+
"localstack-core/localstack/aws/connect.py" = "py310" # imported by CLI tests
214215

215216
[tool.deptry]
216217
known_first_party = [

0 commit comments

Comments
 (0)