1
0

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 17:48:19 -04:00
committed by GitHub
parent cba3a814c6
commit fc244bb592
539 changed files with 4599 additions and 5066 deletions

View File

@@ -18,7 +18,7 @@
#
#
from typing import List, Optional
from typing import Optional
from unittest.mock import Mock, patch
from synapse._scripts.register_new_matrix_user import request_registration
@@ -60,8 +60,8 @@ class RegisterTestCase(TestCase):
requests.post = post
# The fake stdout will be written here
out: List[str] = []
err_code: List[int] = []
out: list[str] = []
err_code: list[int] = []
with patch("synapse._scripts.register_new_matrix_user.requests", requests):
request_registration(
@@ -96,8 +96,8 @@ class RegisterTestCase(TestCase):
requests.get = get
# The fake stdout will be written here
out: List[str] = []
err_code: List[int] = []
out: list[str] = []
err_code: list[int] = []
with patch("synapse._scripts.register_new_matrix_user.requests", requests):
request_registration(
@@ -151,8 +151,8 @@ class RegisterTestCase(TestCase):
requests.post = post
# The fake stdout will be written here
out: List[str] = []
err_code: List[int] = []
out: list[str] = []
err_code: list[int] = []
with patch("synapse._scripts.register_new_matrix_user.requests", requests):
request_registration(