Skip to content

Commit 2e837af

Browse files
Additional ruff fixes
1 parent cc3a111 commit 2e837af

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

doc/exts/pylint_messages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from inspect import getmodule
1313
from itertools import chain, groupby
1414
from pathlib import Path
15-
from typing import DefaultDict, Dict, List, NamedTuple, Tuple
15+
from typing import NamedTuple
1616

1717
from sphinx.application import Sphinx
1818

@@ -52,8 +52,8 @@ class ExampleType(str, Enum):
5252
BAD = "bad"
5353

5454

55-
MessagesDict = Dict[str, List[MessageData]]
56-
OldMessagesDict = Dict[str, DefaultDict[Tuple[str, str], List[Tuple[str, str]]]]
55+
MessagesDict = dict[str, list[MessageData]]
56+
OldMessagesDict = dict[str, defaultdict[tuple[str, str], list[tuple[str, str]]]]
5757
"""DefaultDict is indexed by tuples of (old name symbol, old name id) and values are
5858
tuples of (new name symbol, new name category).
5959
"""

doc/exts/pylint_options.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from collections import defaultdict
1111
from inspect import getmodule
1212
from pathlib import Path
13-
from typing import Dict, List, NamedTuple
13+
from typing import NamedTuple
1414

1515
import tomlkit
1616
from sphinx.application import Sphinx
@@ -30,7 +30,7 @@ class OptionsData(NamedTuple):
3030
extension: bool
3131

3232

33-
OptionsDataDict = Dict[str, List[OptionsData]]
33+
OptionsDataDict = dict[str, list[OptionsData]]
3434

3535
PYLINT_BASE_PATH = Path(__file__).resolve().parent.parent.parent
3636
"""Base path to the project folder."""

tests/checkers/unittest_stdlib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import contextlib
88
from collections.abc import Callable, Iterator
9-
from typing import Any, Type
9+
from typing import Any
1010

1111
import astroid
1212
from astroid import nodes
@@ -16,7 +16,7 @@
1616
from pylint.checkers import stdlib
1717
from pylint.testutils import CheckerTestCase
1818

19-
_NodeNGT = Type[nodes.NodeNG]
19+
_NodeNGT = type[nodes.NodeNG]
2020

2121

2222
@contextlib.contextmanager

0 commit comments

Comments
 (0)