File tree 3 files changed +6
-19
lines changed
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 9
9
import warnings
10
10
from collections .abc import Sequence
11
11
from pathlib import Path
12
- from typing import Any , ClassVar
12
+ from typing import ClassVar
13
13
14
14
from pylint import config
15
15
from pylint .checkers .utils import clear_lru_caches
@@ -97,9 +97,6 @@ def _cpu_count() -> int:
97
97
return cpu_count
98
98
99
99
100
- UNUSED_PARAM_SENTINEL = object ()
101
-
102
-
103
100
class Run :
104
101
"""Helper class to use as main for pylint with 'run(*sys.argv[1:])'."""
105
102
@@ -123,7 +120,6 @@ def __init__(
123
120
args : Sequence [str ],
124
121
reporter : BaseReporter | None = None ,
125
122
exit : bool = True , # pylint: disable=redefined-builtin
126
- do_exit : Any = UNUSED_PARAM_SENTINEL ,
127
123
) -> None :
128
124
# Immediately exit if user asks for version
129
125
if "--version" in args :
@@ -215,16 +211,6 @@ def __init__(
215
211
else :
216
212
linter .check (args )
217
213
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
-
228
214
if linter .config .clear_cache_post_run :
229
215
clear_lru_caches ()
230
216
MANAGER .clear_cache ()
Original file line number Diff line number Diff line change 10
10
from __future__ import annotations
11
11
12
12
from collections .abc import Sequence
13
- from typing import Any
14
13
15
14
from pylint .lint import Run as LintRun
16
- from pylint .lint .run import UNUSED_PARAM_SENTINEL
17
15
from pylint .reporters .base_reporter import BaseReporter
18
16
from pylint .testutils .lint_module_test import PYLINTRC
19
17
@@ -39,7 +37,6 @@ def __init__(
39
37
args : Sequence [str ],
40
38
reporter : BaseReporter | None = None ,
41
39
exit : bool = True , # pylint: disable=redefined-builtin
42
- do_exit : Any = UNUSED_PARAM_SENTINEL ,
43
40
) -> None :
44
41
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