Skip to content

Commit 38e5481

Browse files
Revert "Remove --min_pyver_end_position"
This reverts commit 4b45192.
1 parent 52fe657 commit 38e5481

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

doc/development_guide/contributor_guide/tests/writing_test.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ test runner. The following options are currently supported:
6161

6262
- "min_pyver": Minimal python version required to run the test
6363
- "max_pyver": Python version from which the test won't be run. If the last supported version is 3.9 this setting should be set to 3.10.
64+
- "min_pyver_end_position": Minimal python version required to check the end_line and end_column attributes of the message
6465
- "requires": Packages required to be installed locally to run the test
6566
- "except_implementations": List of python implementations on which the test should not run
6667
- "exclude_platforms": List of operating systems on which the test should not run

doc/whatsnew/fragments/9774.other

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
Remove support for launching pylint with Python 3.8.
22
Code that supports Python 3.8 can still be linted with the ``--py-version=3.8`` setting.
33

4-
``--min_pyver_end_position`` in the functional test runner is no longer relevant and is removed.
5-
64
Refs #9774

pylint/testutils/functional/test_file.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class NoFileError(Exception):
2222
class TestFileOptions(TypedDict):
2323
min_pyver: tuple[int, ...]
2424
max_pyver: tuple[int, ...]
25+
min_pyver_end_position: tuple[int, ...]
2526
requires: list[str]
2627
except_implementations: list[str]
2728
exclude_platforms: list[str]
@@ -32,6 +33,7 @@ class TestFileOptions(TypedDict):
3233
POSSIBLE_TEST_OPTIONS = {
3334
"min_pyver",
3435
"max_pyver",
36+
"min_pyver_end_position",
3537
"requires",
3638
"except_implementations",
3739
"exclude_platforms",
@@ -45,6 +47,7 @@ class FunctionalTestFile:
4547
_CONVERTERS: dict[str, Callable[[str], tuple[int, ...] | list[str]]] = {
4648
"min_pyver": parse_python_version,
4749
"max_pyver": parse_python_version,
50+
"min_pyver_end_position": parse_python_version,
4851
"requires": lambda s: [i.strip() for i in s.split(",")],
4952
"except_implementations": lambda s: [i.strip() for i in s.split(",")],
5053
"exclude_platforms": lambda s: [i.strip() for i in s.split(",")],
@@ -58,6 +61,7 @@ def __init__(self, directory: str, filename: str) -> None:
5861
self.options: TestFileOptions = {
5962
"min_pyver": (2, 5),
6063
"max_pyver": (4, 0),
64+
"min_pyver_end_position": (3, 8),
6165
"requires": [],
6266
"except_implementations": [],
6367
"exclude_platforms": [],

pylint/testutils/lint_module_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ def __init__(
7979
self._linter._arg_parser.add_argument(
8080
"--max_pyver", type=parse_python_version, default=(4, 0)
8181
)
82+
self._linter._arg_parser.add_argument(
83+
"--min_pyver_end_position", type=parse_python_version, default=(3, 8)
84+
)
8285
self._linter._arg_parser.add_argument(
8386
"--requires", type=lambda s: [i.strip() for i in s.split(",")], default=[]
8487
)

0 commit comments

Comments
 (0)