Finish the examples-typing sweep with the last non-docs-visible
scripts: `-> None` on the two `trio/` behavior-demo mains (plus a
`trio.TaskStatus` on `hold_lock_forever`) and nursery/portal typing
on `integration/mpi4py/inherit_parent_main.py`.
Leaves `concurrent_futures_primes` (a verbatim stdlib baseline) and
`integration/open_context_and_sleep` (its tractor nursery is
commented out) as-is, and the paren-group `trio.open_nursery()`
bindings unannotated (no clean spot for a preceding annotation).
Completes the examples-typing bullet in #472.
(this patch was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
So we can parametrize in various toggles to `main()` including,
- `child_errors_mid_stream: bool` which now also drives whether an
additional, and otherwise non-affecting, `_tn` is allocated in
the `finite_stream_to_rent()` subtask, only in the early stream
termination case does it seem to produce a masked outcome?
* see surrounding notes within.
- `raise_unmasked: bool` to toggle whether the embedded unmasker fn
will actually raise the masked user RTE; this enables demoing the
masked outcomes via simple switch and makes it easy to wrap them
as `pytest.xfail()` outcomes.
Also in support,
- use `.trionics.collapse_eg()` around the root tn to ensure when
unmasking we can catch the EG-unwrapped RTE easily from a test.
- flip stream `msg` logs to `.debug()` to reduce console noise.
- tweak mod's script iface to report/trace unexpected non-RTEs.