Skip to content

Make Any boundaries explicit for ty unsound-return-statement - #953

Draft
Sun Haoran (haoranpb) wants to merge 1 commit into
ty/strict-unsound-assignmentfrom
ty/strict-unsound-return
Draft

Sun Haoran (haoranpb) wants to merge 1 commit into
ty/strict-unsound-assignmentfrom
ty/strict-unsound-return

Conversation

@haoranpb

@haoranpb Sun Haoran (haoranpb) commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

What

Fix ty unsound-return-statement: functions returning Any where a precise type is declared. Uses isinstance narrowing, bool(...), typed locals, and cast at JSON boundaries. Python only.

Part of the stack that makes ty strict (all = "error") across the whole uv workspace. Each PR fixes one rule in Python code only; the config change lands in #956.

@haoranpb
Sun Haoran (haoranpb) added this pull request to stack #957 October 7, 2026 12:57
@github-code-quality

github-code-quality Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: Python

Python / code-coverage/pytest

The overall line coverage in commit cab787a in the ty/strict-unsound-re... branch remains at 86%, unchanged from commit d19989f in the ty/strict-unsound-as... branch.

Show a line coverage summary of the most impacted files.
File ty/strict-unsound-as... d19989f ty/strict-unsound-re... cab787a +/-
src/bcbench/eva...stgeneration.py 43% 42% -1%
src/bcbench/col...t_codereview.py 89% 88% -1%
src/bcbench/types.py 91% 92% +1%
src/bcbench/com...nds/evaluate.py 76% 77% +1%
src/bcbench/eva...te/dataquery.py 67% 69% +2%
src/bcbench/evaluate/nl2al.py 79% 81% +2%
src/bcbench/age...t/shared/mcp.py 92% 95% +3%
src/bcbench/eva...st_implement.py 65% 69% +4%
src/bcbench/evaluate/bugfix.py 47% 52% +5%
src/bcbench/eva...quest_triage.py 55% 62% +7%

Updated October 07, 2026 13:49 UTC

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 70c54f79-d7a0-4cde-baf2-e53dfff3deb4

This branch has not been deployed

No deployments
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.

1 participant