`mypy-status` is not very useful if it triggers `-x`/`--exitfirst`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- testing-qa, tooling
Research direction
Reproduce the failure with pytest -s -vvv --mypy, focusing on tests/__init__.py::mypy-status, and compare it with mypy tests/__init__.py. Trace how the plugin reports mypy's status when pytest uses -x/--exitfirst; done means the status test no longer reports errors when the direct mypy check succeeds.
Written by the indexing model from the issue text.
Description
The mypy plugin here falls over, complains about errors, but there aren't any…
% pytest -s -vvv --mypy
===================================== test session starts =====================================
platform linux -- Python 3.13.3, pytest-8.3.5, pluggy-1.5.0 -- /home/madduck/code/tc/tptools/.direnv/python-3.13.3/bin/python3
cachedir: .pytest_cache
rootdir: /home/madduck/code/tc/tptools
configfile: pyproject.toml
testpaths: tests, integration
plugins: anyio-4.9.0, cov-6.1.1, devtools-0.12.2, asyncio-0.26.0, subtests-0.14.1, mypy-1.0.1
asyncio: mode=Mode.STRICT, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
collected 352 items
tests/__init__.py::mypy PASSED
tests/__init__.py::mypy-status FAILED
========================================== FAILURES ===========================================
________________________________________ test session _________________________________________
mypy exited with status 1.
-------------------------------------- Captured log call --------------------------------------
filelock DEBUG Attempting to acquire lock 140525569634576 on /home/madduck/.tmp/tmpw90y_v42.lock
filelock DEBUG Lock 140525569634576 acquired on /home/madduck/.tmp/tmpw90y_v42.lock
filelock DEBUG Attempting to release lock 140525569634576 on /home/madduck/.tmp/tmpw90y_v42.lock
filelock DEBUG Lock 140525569634576 released on /home/madduck/.tmp/tmpw90y_v42.lock
============================================ mypy =============================================
Found 4 errors in 1 file (checked 27 source files)
=================================== short test summary info ===================================
FAILED tests/__init__.py::mypy-status
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================= 1 failed, 1 passed in 0.81s =================================
However:
% mypy tests/__init__.py
Success: no issues found in 1 source file
% echo $?
0
- Dominant language
- Python
- Stars
- 257
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from realpython/pytest-mypy
-
realpython/pytest-mypy#190 · 1 comment · 1 assignee ·
-
integration
Difficulty 3/5 1-2 days Newbie friendliness 38/100
realpython/pytest-mypy#160 · 4 comments ·
-
integration
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
realpython/pytest-mypy#138 · 2 comments · 2 reactions ·
-
Expected mypy errors Open
realpython/pytest-mypy#105 · 4 comments · 1 assignee ·
-
reporting
Difficulty 5/5 Over a week Newbie friendliness 30/100
realpython/pytest-mypy#23 · 1 comment · 2 reactions ·
All issues in realpython/pytest-mypy
Similar issues
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100