diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2021-09-16 22:12:19 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-09-16 22:38:28 +0200 |
commit | 6d07d6f1a51c2e3e3e2db37f23c12ebdec094410 (patch) | |
tree | eab8b8aea151845c8713e3233483db1f65682320 /pylint/interfaces.py | |
parent | f45ab4972bbf140d449a023bf1407237d21c5879 (diff) | |
download | pylint-git-6d07d6f1a51c2e3e3e2db37f23c12ebdec094410.tar.gz |
Add typing for ``json_reporter`` and sub-classes
Diffstat (limited to 'pylint/interfaces.py')
-rw-r--r-- | pylint/interfaces.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pylint/interfaces.py b/pylint/interfaces.py index 8480f9d74..e657e7115 100644 --- a/pylint/interfaces.py +++ b/pylint/interfaces.py @@ -18,10 +18,13 @@ """Interfaces for Pylint objects""" from collections import namedtuple -from typing import Tuple +from typing import TYPE_CHECKING, Tuple from astroid import nodes +if TYPE_CHECKING: + from pylint.reporters.ureports.nodes import Section + Confidence = namedtuple("Confidence", ["name", "description"]) # Warning Certainties HIGH = Confidence("HIGH", "No false positive possible.") @@ -99,7 +102,7 @@ class IReporter(Interface): def handle_message(self, msg) -> None: """Handle the given message object.""" - def display_reports(self, layout): + def display_reports(self, layout: "Section") -> None: """display results encapsulated in the layout tree""" |