Refactor: Extracted out/outN parsing logic from parse_test_case
Partially addresses #5917.
This PR refactors the parse_test_case function in mypy/test/data.py by extracting the logic that parses [out] and [outN] sections into a new private helper, _handle_out_section(). This reduces the size and nesting of parse_test_case and makes its responsibilities clearer.
Note: This is a partial refactor from #5917. Only
parse_test_caseis updated in this PR; the remaining refactoring work described in the issue is intentionally left for follow-up changes.
No behavior changes are intended. No new tests were added; the existing test suite passes, confirming that this refactor is functionally neutral.
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅