Skip to content

Conversation

@LeoLomardo
Copy link

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_case is 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.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Author

@LeoLomardo LeoLomardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the long functions list files.

@LeoLomardo LeoLomardo requested a review from sterliakov November 4, 2025 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants