Skip to content

Commit dacdf4b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 1175e37 commit dacdf4b

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

mypy/test/teststubtest.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
from collections.abc import Iterator
1313
from typing import Any, Callable
1414

15+
from pytest import raises
16+
1517
import mypy.stubtest
1618
from mypy import build, nodes
1719
from mypy.modulefinder import BuildSource
1820
from mypy.options import Options
1921
from mypy.stubtest import parse_options, test_stubs
2022
from mypy.test.config import test_temp_dir
2123
from mypy.test.data import root_dir
22-
from pytest import raises
2324

2425

2526
@contextlib.contextmanager
@@ -172,7 +173,12 @@ def build_helper(source: str) -> build.BuildResult:
172173

173174

174175
def run_stubtest_with_stderr(
175-
stub: str, runtime: str, options: list[str], config_file: str | None = None, output: io.StringIO | None = None, outerr: io.StringIO | None = None
176+
stub: str,
177+
runtime: str,
178+
options: list[str],
179+
config_file: str | None = None,
180+
output: io.StringIO | None = None,
181+
outerr: io.StringIO | None = None,
176182
) -> tuple[str, str]:
177183
with use_tmp_dir(TEST_MODULE_NAME) as tmp_dir:
178184
with open("builtins.pyi", "w") as f:
@@ -2893,7 +2899,12 @@ def test_config_file_error_codes_invalid(self) -> None:
28932899
outerr = io.StringIO()
28942900
with raises(SystemExit):
28952901
run_stubtest_with_stderr(
2896-
stub=stub, runtime=runtime, options=[], config_file=config_file, output=output, outerr=outerr
2902+
stub=stub,
2903+
runtime=runtime,
2904+
options=[],
2905+
config_file=config_file,
2906+
output=output,
2907+
outerr=outerr,
28972908
)
28982909

28992910
assert output.getvalue() == "error: Invalid error code(s): not-a-valid-name\n"

0 commit comments

Comments
 (0)