You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci(#2484): satisfy pyright strict-mode and 100% coverage
Second CI round caught two more things the local run did not:
1. pyright on the CI runs in a stricter mode than the default, and
flagged every new test:
- `anyio_backend` parametrize fixture needs an explicit `str` type
- `monkeypatch` needs `pytest.MonkeyPatch`
- `*args, **kwargs` on the stub stream class need `Any`
- `__aiter__` / `__anext__` need return types
All annotated; pyright now reports 0 errors on both files.
2. The project's coverage floor is `fail_under = 100`. Extracting the
trio branch into its own helper function left lines 184-187 (the
body of `_anyio_task_group_background`) and the `else:` on line
304 uncovered, because every existing test runs on asyncio.
Added `test_stdio_client_supports_lifo_cleanup_on_trio` —
parametrised with `anyio_backend=["trio"]`, it exercises the trio
branch end-to-end with the LIFO cleanup pattern that is valid on
trio. Removed the `# pragma: lax no cover` markers on the helper
and the else branch since coverage is now genuine, not silenced.
15/16 stdio tests pass locally (15 real pass + 1 Unix-only SIGINT
skip). pyright: 0 errors. ruff: clean.
0 commit comments