summaryrefslogtreecommitdiff
path: root/pylint/reporters/text.py
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2021-09-16 22:12:19 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-09-16 22:38:28 +0200
commit6d07d6f1a51c2e3e3e2db37f23c12ebdec094410 (patch)
treeeab8b8aea151845c8713e3233483db1f65682320 /pylint/reporters/text.py
parentf45ab4972bbf140d449a023bf1407237d21c5879 (diff)
downloadpylint-git-6d07d6f1a51c2e3e3e2db37f23c12ebdec094410.tar.gz
Add typing for ``json_reporter`` and sub-classes
Diffstat (limited to 'pylint/reporters/text.py')
-rw-r--r--pylint/reporters/text.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pylint/reporters/text.py b/pylint/reporters/text.py
index 53eef21d2..e941ba60d 100644
--- a/pylint/reporters/text.py
+++ b/pylint/reporters/text.py
@@ -26,7 +26,7 @@
import os
import sys
import warnings
-from typing import Optional
+from typing import TYPE_CHECKING, Optional
from pylint import utils
from pylint.interfaces import IReporter
@@ -34,6 +34,9 @@ from pylint.message import Message
from pylint.reporters import BaseReporter
from pylint.reporters.ureports.text_writer import TextWriter
+if TYPE_CHECKING:
+ from pylint.reporters.ureports.nodes import Section
+
TITLE_UNDERLINES = ["", "=", "-", "."]
ANSI_PREFIX = "\033["
@@ -155,7 +158,7 @@ class TextReporter(BaseReporter):
self.writeln("************* ")
self.write_message(msg)
- def _display(self, layout):
+ def _display(self, layout: "Section") -> None:
"""launch layouts display"""
print(file=self.out)
TextWriter().format(layout, self.out)