File tree Expand file tree Collapse file tree 3 files changed +6
-19
lines changed
Expand file tree Collapse file tree 3 files changed +6
-19
lines changed Original file line number Diff line number Diff line change 1+ Following a deprecation period, the ``do_exit`` argument of the ``Run`` class (and of the ``_Run``
2+ class in testutils) were removed.
3+
4+ Refs #8472
Original file line number Diff line number Diff line change 99import warnings
1010from collections .abc import Sequence
1111from pathlib import Path
12- from typing import Any , ClassVar
12+ from typing import ClassVar
1313
1414from pylint import config
1515from pylint .checkers .utils import clear_lru_caches
@@ -97,9 +97,6 @@ def _cpu_count() -> int:
9797 return cpu_count
9898
9999
100- UNUSED_PARAM_SENTINEL = object ()
101-
102-
103100class Run :
104101 """Helper class to use as main for pylint with 'run(*sys.argv[1:])'."""
105102
@@ -123,7 +120,6 @@ def __init__(
123120 args : Sequence [str ],
124121 reporter : BaseReporter | None = None ,
125122 exit : bool = True , # pylint: disable=redefined-builtin
126- do_exit : Any = UNUSED_PARAM_SENTINEL ,
127123 ) -> None :
128124 # Immediately exit if user asks for version
129125 if "--version" in args :
@@ -215,16 +211,6 @@ def __init__(
215211 else :
216212 linter .check (args )
217213 score_value = linter .generate_reports ()
218-
219- if do_exit is not UNUSED_PARAM_SENTINEL :
220- # TODO: 3.0
221- warnings .warn (
222- "do_exit is deprecated and it is going to be removed in a future version." ,
223- DeprecationWarning ,
224- stacklevel = 2 ,
225- )
226- exit = do_exit
227-
228214 if linter .config .clear_cache_post_run :
229215 clear_lru_caches ()
230216 MANAGER .clear_cache ()
Original file line number Diff line number Diff line change 1010from __future__ import annotations
1111
1212from collections .abc import Sequence
13- from typing import Any
1413
1514from pylint .lint import Run as LintRun
16- from pylint .lint .run import UNUSED_PARAM_SENTINEL
1715from pylint .reporters .base_reporter import BaseReporter
1816from pylint .testutils .lint_module_test import PYLINTRC
1917
@@ -39,7 +37,6 @@ def __init__(
3937 args : Sequence [str ],
4038 reporter : BaseReporter | None = None ,
4139 exit : bool = True , # pylint: disable=redefined-builtin
42- do_exit : Any = UNUSED_PARAM_SENTINEL ,
4340 ) -> None :
4441 args = _add_rcfile_default_pylintrc (list (args ))
45- super ().__init__ (args , reporter , exit , do_exit )
42+ super ().__init__ (args , reporter , exit )
You can’t perform that action at this time.
0 commit comments