diff options
Diffstat (limited to 'tests/unittest_reporting.py')
-rw-r--r-- | tests/unittest_reporting.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/unittest_reporting.py b/tests/unittest_reporting.py index 88f9c43b5..c0fdb61d4 100644 --- a/tests/unittest_reporting.py +++ b/tests/unittest_reporting.py @@ -21,6 +21,7 @@ import warnings from contextlib import redirect_stdout from io import StringIO from json import dumps +from typing import TYPE_CHECKING import pytest @@ -31,6 +32,9 @@ from pylint.reporters import BaseReporter from pylint.reporters.text import ParseableTextReporter, TextReporter from pylint.typing import FileItem +if TYPE_CHECKING: + from pylint.reporters.ureports.nodes import Section + @pytest.fixture(scope="module") def reporter(): @@ -93,7 +97,7 @@ class NopReporter(BaseReporter): def writeln(self, string=""): pass - def _display(self, layout): + def _display(self, layout: "Section") -> None: pass @@ -257,7 +261,7 @@ def test_multi_format_output(tmp_path): def test_display_results_is_renamed(): class CustomReporter(TextReporter): - def _display(self, layout): + def _display(self, layout: "Section") -> None: return None reporter = CustomReporter() |