Use type hinting generics in standard collections (#19046)

aka PEP 585, added in Python 3.9

 - https://peps.python.org/pep-0585/
 - https://docs.astral.sh/ruff/rules/non-pep585-annotation/
This commit is contained in:
Andrew Ferrazzutti
2025-10-22 16:48:19 -05:00
committed by GitHub
parent cba3a814c6
commit fc244bb592
539 changed files with 4599 additions and 5066 deletions
+5 -5
View File
@@ -19,7 +19,7 @@
#
#
import logging
from typing import Any, Iterable, List, Optional, Tuple
from typing import Any, Iterable, Optional
from canonicaljson import encode_canonical_json
from parameterized import parameterized
@@ -244,13 +244,13 @@ class EventsWorkerStoreTestCase(BaseWorkerStoreTestCase):
key: Optional[str] = None,
internal: Optional[dict] = None,
depth: Optional[int] = None,
prev_events: Optional[List[Tuple[str, dict]]] = None,
auth_events: Optional[List[str]] = None,
prev_state: Optional[List[str]] = None,
prev_events: Optional[list[tuple[str, dict]]] = None,
auth_events: Optional[list[str]] = None,
prev_state: Optional[list[str]] = None,
redacts: Optional[str] = None,
push_actions: Iterable = frozenset(),
**content: object,
) -> Tuple[EventBase, EventContext]:
) -> tuple[EventBase, EventContext]:
prev_events = prev_events or []
auth_events = auth_events or []
prev_state = prev_state or []