Skip to content

Commit 9c7ba76

Browse files
EliahKaganclaude
andcommitted
build(tox): let a mypy failure fail the tox run
The tox `mypy` environment has `ignore_outcome = true`, so a failure there is reported but does not fail the run. 4bea7cf (gitpython-developers#1667) added that to match CI, where the mypy step had `continue-on-error: true` because GitPython was not expected to pass mypy at the time. But 50762f1 (gitpython-developers#2087) removed `continue-on-error` from that step, so a mypy failure has failed CI since then, and mypy passes there on every Python version the `test` job covers. The tox environment was never updated to match. `ignore_outcome` also hides failures to set the environment up at all. In a minimal project with tox 4.22.0 and 4.67.1, an environment with `ignore_outcome = true` and a dependency that cannot be installed let tox exit with status 0; without `ignore_outcome`, the same environment made tox exit with status 1. Remove `ignore_outcome`, so `mypy` failures fail tox as they fail CI. With tox 4.67.1, the `mypy` environment now passes on Python 3.9.6 and 3.13.18, selected with `-x testenv:mypy.base_python=py39` and `py313` ("Success: no issues found in 40 source files"). 3.9 is in its `base_python` list, though CI only type-checks on 3.11 and later. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent dae1790 commit 9c7ba76

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎tox.ini‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ base_python = py39, py310, py311, py312, py313, py314, py315
5252
set_env =
5353
MYPY_FORCE_COLOR = 1
5454
commands = mypy
55-
ignore_outcome = true
5655

5756
[testenv:html]
5857
description = Build HTML documentation

0 commit comments

Comments
 (0)