Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions pylint/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
from __future__ import annotations

import warnings
from collections import namedtuple
from tokenize import TokenInfo
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, NamedTuple

from astroid import nodes

Expand All @@ -33,7 +32,12 @@
"CONFIDENCE_LEVEL_NAMES",
)

Confidence = namedtuple("Confidence", ["name", "description"])

class Confidence(NamedTuple):
name: str
description: str


# Warning Certainties
HIGH = Confidence("HIGH", "Warning that is not based on inference result.")
CONTROL_FLOW = Confidence(
Expand Down
6 changes: 4 additions & 2 deletions pylint/utils/pragma_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from __future__ import annotations

import re
from collections import namedtuple
from collections.abc import Generator
from typing import NamedTuple

# Allow stopping after the first semicolon/hash encountered,
# so that an option can be continued with the reasons
Expand All @@ -27,7 +27,9 @@
OPTION_PO = re.compile(OPTION_RGX, re.VERBOSE)


PragmaRepresenter = namedtuple("PragmaRepresenter", "action messages")
class PragmaRepresenter(NamedTuple):
action: str
messages: list[str]


ATOMIC_KEYWORDS = frozenset(("disable-all", "skip-file"))
Expand Down