mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-22 13:12:30 +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:
1 parent
cba3a814c6
commit
fc244bb592
539 files changed
+4599
-5066
No files matched your search
@@ -24,7 +24,6 @@ import tempfile
|
||||
import unittest
|
||||
from contextlib import redirect_stdout
|
||||
from io import StringIO
|
||||
from typing import List
|
||||
|
||||
from synapse.config.homeserver import HomeServerConfig
|
||||
|
||||
@@ -61,7 +60,7 @@ class ConfigFileTestCase(unittest.TestCase):
|
||||
with open(self.config_file, "w") as f:
|
||||
f.write("".join(contents))
|
||||
|
||||
def add_lines_to_config(self, lines: List[str]) -> None:
|
||||
def add_lines_to_config(self, lines: list[str]) -> None:
|
||||
with open(self.config_file, "a") as f:
|
||||
for line in lines:
|
||||
f.write(line + "\n")
|
||||
Reference in new issue
Block a user