summaryrefslogtreecommitdiff
path: root/tests/pyreverse/test_diadefs.py
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2022-04-14 19:37:49 +0200
committerGitHub <noreply@github.com>2022-04-14 19:37:49 +0200
commit8f872bf49c344d1d16b3573136d53b2cbda007c6 (patch)
treed203652d9d515b2a5d47cca6e1f7519a157d5990 /tests/pyreverse/test_diadefs.py
parentadf660a7300148a31cdb8bc25301bfd21af0602b (diff)
downloadpylint-git-8f872bf49c344d1d16b3573136d53b2cbda007c6.tar.gz
Use ``python-typing-update`` on half of the ``tests`` directory (#6317)
Diffstat (limited to 'tests/pyreverse/test_diadefs.py')
-rw-r--r--tests/pyreverse/test_diadefs.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/pyreverse/test_diadefs.py b/tests/pyreverse/test_diadefs.py
index ecb601b0c..059f756bc 100644
--- a/tests/pyreverse/test_diadefs.py
+++ b/tests/pyreverse/test_diadefs.py
@@ -3,10 +3,14 @@
# Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
"""Unit test for the extensions.diadefslib modules."""
+
# pylint: disable=redefined-outer-name
+
+from __future__ import annotations
+
import sys
+from collections.abc import Callable
from pathlib import Path
-from typing import Callable, Dict, List, Tuple
import pytest
from astroid import nodes
@@ -22,14 +26,14 @@ from pylint.pyreverse.inspector import Linker, Project
from pylint.testutils.pyreverse import PyreverseConfig
-def _process_classes(classes: List[DiagramEntity]) -> List[Tuple[bool, str]]:
+def _process_classes(classes: list[DiagramEntity]) -> list[tuple[bool, str]]:
"""Extract class names of a list."""
return sorted((isinstance(c.node, nodes.ClassDef), c.title) for c in classes)
def _process_relations(
- relations: Dict[str, List[Relationship]]
-) -> List[Tuple[str, str, str]]:
+ relations: dict[str, list[Relationship]]
+) -> list[tuple[str, str, str]]:
"""Extract relation indices from a relation list."""
result = []
for rel_type, rels in relations.items():