Skip to content

Revert "Remove --min_pyver_end_position" #9784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ test runner. The following options are currently supported:

- "min_pyver": Minimal python version required to run the test
- "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.
- "min_pyver_end_position": Minimal python version required to check the end_line and end_column attributes of the message
- "requires": Packages required to be installed locally to run the test
- "except_implementations": List of python implementations on which the test should not run
- "exclude_platforms": List of operating systems on which the test should not run
Expand Down
2 changes: 0 additions & 2 deletions doc/whatsnew/fragments/9774.other
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Remove support for launching pylint with Python 3.8.
Code that supports Python 3.8 can still be linted with the ``--py-version=3.8`` setting.

``--min_pyver_end_position`` in the functional test runner is no longer relevant and is removed.

Refs #9774
4 changes: 4 additions & 0 deletions pylint/testutils/functional/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class NoFileError(Exception):
class TestFileOptions(TypedDict):
min_pyver: tuple[int, ...]
max_pyver: tuple[int, ...]
min_pyver_end_position: tuple[int, ...]
requires: list[str]
except_implementations: list[str]
exclude_platforms: list[str]
Expand All @@ -32,6 +33,7 @@ class TestFileOptions(TypedDict):
POSSIBLE_TEST_OPTIONS = {
"min_pyver",
"max_pyver",
"min_pyver_end_position",
"requires",
"except_implementations",
"exclude_platforms",
Expand All @@ -45,6 +47,7 @@ class FunctionalTestFile:
_CONVERTERS: dict[str, Callable[[str], tuple[int, ...] | list[str]]] = {
"min_pyver": parse_python_version,
"max_pyver": parse_python_version,
"min_pyver_end_position": parse_python_version,
"requires": lambda s: [i.strip() for i in s.split(",")],
"except_implementations": lambda s: [i.strip() for i in s.split(",")],
"exclude_platforms": lambda s: [i.strip() for i in s.split(",")],
Expand All @@ -58,6 +61,7 @@ def __init__(self, directory: str, filename: str) -> None:
self.options: TestFileOptions = {
"min_pyver": (2, 5),
"max_pyver": (4, 0),
"min_pyver_end_position": (3, 8),
"requires": [],
"except_implementations": [],
"exclude_platforms": [],
Expand Down
3 changes: 3 additions & 0 deletions pylint/testutils/lint_module_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ def __init__(
self._linter._arg_parser.add_argument(
"--max_pyver", type=parse_python_version, default=(4, 0)
)
self._linter._arg_parser.add_argument(
"--min_pyver_end_position", type=parse_python_version, default=(3, 8)
)
self._linter._arg_parser.add_argument(
"--requires", type=lambda s: [i.strip() for i in s.split(",")], default=[]
)
Expand Down