File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 77from __future__ import annotations
88
99import warnings
10- from collections import namedtuple
1110from tokenize import TokenInfo
12- from typing import TYPE_CHECKING
11+ from typing import TYPE_CHECKING , NamedTuple
1312
1413from astroid import nodes
1514
3332 "CONFIDENCE_LEVEL_NAMES" ,
3433)
3534
36- Confidence = namedtuple ("Confidence" , ["name" , "description" ])
35+
36+ class Confidence (NamedTuple ):
37+ name : str
38+ description : str
39+
40+
3741# Warning Certainties
3842HIGH = Confidence ("HIGH" , "Warning that is not based on inference result." )
3943CONTROL_FLOW = Confidence (
Original file line number Diff line number Diff line change 55from __future__ import annotations
66
77import re
8- from collections import namedtuple
98from collections .abc import Generator
9+ from typing import NamedTuple
1010
1111# Allow stopping after the first semicolon/hash encountered,
1212# so that an option can be continued with the reasons
2727OPTION_PO = re .compile (OPTION_RGX , re .VERBOSE )
2828
2929
30- PragmaRepresenter = namedtuple ("PragmaRepresenter" , "action messages" )
30+ class PragmaRepresenter (NamedTuple ):
31+ action : str
32+ messages : list [str ]
3133
3234
3335ATOMIC_KEYWORDS = frozenset (("disable-all" , "skip-file" ))
You can’t perform that action at this time.
0 commit comments