|
11 | 11 | from collections import Counter
|
12 | 12 | from io import StringIO
|
13 | 13 | from pathlib import Path
|
14 |
| -from typing import Counter as CounterType |
15 |
| -from typing import TextIO, Tuple |
| 14 | +from typing import TextIO |
16 | 15 |
|
17 | 16 | import pytest
|
18 | 17 | from _pytest.config import Config
|
19 | 18 |
|
20 | 19 | from pylint import checkers
|
21 | 20 | from pylint.config.config_initialization import _config_initialization
|
22 |
| -from pylint.constants import IS_PYPY |
23 | 21 | from pylint.lint import PyLinter
|
24 | 22 | from pylint.message.message import Message
|
25 | 23 | from pylint.testutils.constants import _EXPECTED_RE, _OPERATORS, UPDATE_OPTION
|
|
33 | 31 | from pylint.testutils.output_line import OutputLine
|
34 | 32 | from pylint.testutils.reporter_for_tests import FunctionalTestReporter
|
35 | 33 |
|
36 |
| -MessageCounter = CounterType[Tuple[int, str]] |
| 34 | +MessageCounter = Counter[tuple[int, str]] |
37 | 35 |
|
38 | 36 | PYLINTRC = Path(__file__).parent / "testing_pylintrc"
|
39 | 37 |
|
@@ -108,9 +106,6 @@ def __init__(
|
108 | 106 | self._check_end_position = (
|
109 | 107 | sys.version_info >= self._linter.config.min_pyver_end_position
|
110 | 108 | )
|
111 |
| - # TODO: PY3.9: PyPy supports end_lineno from 3.9 and above |
112 |
| - if self._check_end_position and IS_PYPY: |
113 |
| - self._check_end_position = sys.version_info >= (3, 9) # pragma: no cover |
114 | 109 |
|
115 | 110 | self._config = config
|
116 | 111 |
|
|
0 commit comments