mirror of
https://github.com/element-hq/synapse.git
synced 2026-07-30 07:29:45 +00:00
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:
@@ -28,7 +28,7 @@ import json
|
||||
import sys
|
||||
import warnings
|
||||
from binascii import unhexlify
|
||||
from typing import TYPE_CHECKING, Awaitable, Callable, Tuple, TypeVar
|
||||
from typing import TYPE_CHECKING, Awaitable, Callable, TypeVar
|
||||
|
||||
import attr
|
||||
import zope.interface
|
||||
@@ -102,7 +102,7 @@ class FakeResponse: # type: ignore[misc]
|
||||
attribute, and didn't support deliverBody until recently.
|
||||
"""
|
||||
|
||||
version: Tuple[bytes, int, int] = (b"HTTP", 1, 1)
|
||||
version: tuple[bytes, int, int] = (b"HTTP", 1, 1)
|
||||
|
||||
# HTTP response code
|
||||
code: int = 200
|
||||
|
||||
Reference in New Issue
Block a user