Skip to content

Commit a373e61

Browse files
committed
fix typecheck again
1 parent 6f1baec commit a373e61

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

whole_repo_tests/test_mypy.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ def test_stateful_bundle_generic_type(tmp_path):
260260
f.write_text(
261261
"from hypothesis.stateful import Bundle\n"
262262
"b: Bundle[int] = Bundle('test')\n"
263-
"reveal_type(b.example())\n",
263+
"x = b.example()\n"
264+
"reveal_type(x)\n",
264265
encoding="utf-8",
265266
)
266267
got = get_mypy_analysed_type(f)
@@ -564,14 +565,7 @@ def test_bar(x: str) -> None:
564565
assert_mypy_errors(f, [], python_version=python_version)
565566

566567

567-
@pytest.mark.parametrize(
568-
"python_version",
569-
[
570-
# FIXME: temporary workaround for mypy bug, see hypothesis/pull/4136
571-
pytest.param(v, marks=[pytest.mark.xfail(strict=False)] * (v == "3.13"))
572-
for v in PYTHON_VERSIONS
573-
],
574-
)
568+
@pytest.mark.parametrize("python_version", PYTHON_VERSIONS)
575569
def test_given_only_allows_strategies(tmp_path, python_version):
576570
f = tmp_path / "check_mypy_given_expects_strategies.py"
577571
f.write_text(

whole_repo_tests/test_pyright.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,14 @@ def test_bar(x: str):
6363
assert _get_pyright_errors(file) == []
6464

6565

66-
@pytest.mark.parametrize("python_version", PYTHON_VERSIONS)
66+
@pytest.mark.parametrize(
67+
"python_version",
68+
[
69+
# FIXME: temporary workaround, see hypothesis/pull/4136
70+
pytest.param(v, marks=[pytest.mark.xfail(strict=False)] * (v == "3.13"))
71+
for v in PYTHON_VERSIONS
72+
],
73+
)
6774
def test_given_only_allows_strategies(tmp_path: Path, python_version: str):
6875
file = tmp_path / "test.py"
6976
file.write_text(

0 commit comments

Comments
 (0)