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:
committed by
GitHub
parent
cba3a814c6
commit
fc244bb592
@@ -13,7 +13,6 @@
|
||||
#
|
||||
|
||||
import unittest
|
||||
from typing import Dict
|
||||
|
||||
from synapse.util import MutableOverlayMapping
|
||||
|
||||
@@ -24,7 +23,7 @@ class TestMutableOverlayMapping(unittest.TestCase):
|
||||
def test_init(self) -> None:
|
||||
"""Test initialization with different input types."""
|
||||
# Test with empty dict
|
||||
empty_dict: Dict[str, int] = {}
|
||||
empty_dict: dict[str, int] = {}
|
||||
mapping = MutableOverlayMapping(empty_dict)
|
||||
self.assertEqual(len(mapping), 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user