Skip to content

Commit 663071c

Browse files
Remove version guards in test_messages_documentation.py
1 parent a843b83 commit 663071c

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

doc/test_messages_documentation.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,9 @@
66

77
from __future__ import annotations
88

9-
import sys
10-
11-
if sys.version_info[:2] > (3, 9):
12-
from collections import Counter
13-
else:
14-
from collections import Counter as _Counter
15-
16-
class Counter(_Counter):
17-
def total(self):
18-
return len(tuple(self.elements()))
19-
20-
9+
from collections import Counter
2110
from pathlib import Path
22-
from typing import Counter as CounterType
23-
from typing import TextIO, Tuple
11+
from typing import TextIO
2412

2513
import pytest
2614

@@ -31,7 +19,7 @@ def total(self):
3119
from pylint.testutils.constants import _EXPECTED_RE
3220
from pylint.testutils.reporter_for_tests import FunctionalTestReporter
3321

34-
MessageCounter = CounterType[Tuple[int, str]]
22+
MessageCounter = Counter[tuple[int, str]]
3523

3624

3725
def get_functional_test_files_from_directory(input_dir: Path) -> list[tuple[str, Path]]:

0 commit comments

Comments
 (0)