Skip to content

Add type arguments flagged by ty missing-type-argument - #951

Merged
Sun Haoran (haoranpb) merged 1 commit into
ty/strict-override-decoratorfrom
ty/strict-type-arguments
Oct 8, 2026
Merged

Sun Haoran (haoranpb) merged 1 commit into
ty/strict-override-decoratorfrom
ty/strict-type-arguments

Conversation

@haoranpb

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

Copy link
Copy Markdown
Collaborator

What

Add explicit type arguments flagged by ty missing-type-argument (mostly bare dict -> dict[str, Any], plus generic classes such as AgentRunner, EvaluationContext, CompletedProcess). 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.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 70c54f79-d7a0-4cde-baf2-e53dfff3deb4
@haoranpb
Sun Haoran (haoranpb) added this pull request to stack #957 October 7, 2026 12:57
Comment thread src/bcbench/agent/shared/lsp.py Dismissed
@github-code-quality

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: Python

Python / code-coverage/pytest

The overall line coverage in commit 31b1d1a in the ty/strict-type-argum... branch remains at 86%, unchanged from commit d19989f in the ty/strict-override-d... branch.

Show a line coverage summary of the most impacted files.
File ty/strict-override-d... d19989f ty/strict-type-argum... 31b1d1a +/-
src/bcbench/dat...ataset_entry.py 94% 94% 0%
src/bcbench/dat...lity_request.py 93% 93% 0%
src/bcbench/com...nds/evaluate.py 76% 77% +1%
src/bcbench/eva...e/codereview.py 89% 90% +1%
src/bcbench/eva...te/dataquery.py 67% 69% +2%
src/bcbench/evaluate/nl2al.py 79% 81% +2%
src/bcbench/eva...stgeneration.py 43% 46% +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%

@haoranpb
Sun Haoran (haoranpb) marked this pull request as ready for review October 7, 2026 13:16
Copilot AI balanced review requested due to automatic review settings October 7, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The changes consistently complete generic annotations while preserving existing runtime behavior and type relationships.

Review effort: Balanced
Findings: None

What changed in this PR

Adds explicit generic type arguments throughout Python code to satisfy ty’s missing-type-argument rule without changing runtime behavior.

Changes:

  • Types dictionaries, lists, subprocess results, evaluation contexts, pipelines, and runners.
  • Adds required Any and dataset-entry imports.
  • Aligns DataQuery’s runner signature with the shared protocol.
File Description
tools/​probe_codereview_case.py Types probe data and subprocess results.
tools/​ood_worklist.py Types loaded entries and findings.
tools/​fix_enrichment_iteration_2.py Types enrichment entries.
tools/​fix_enrichment_iteration_1.py Types fix callbacks and entries.
tools/​dump_entries.py Types OOD findings.
tools/​apply_enrichment.py Types enrichment designs.
tests/​test_pr_review_output.py Types report fixtures.
tests/​test_pr_review_agent.py Types malformed-report parameters.
tests/​test_mcp_config.py Types MCP configuration helpers.
tests/​test_lsp_config.py Types parsed LSP configuration.
tests/​test_dataquery_evaluation.py Specifies the DataQuery context type.
tests/​test_claude_code_metrics.py Types stream events.
tests/​test_agent_plugins.py Types plugin configuration helpers.
src/​bcbench/​types.py Types category pipelines.
src/​bcbench/​results/​testgeneration.py Types result factory contexts.
src/​bcbench/​results/​codereview.py Types code-review result contexts.
src/​bcbench/​results/​bugfix.py Types bug-fix result contexts.
src/​bcbench/​results/​base.py Types shared result factory contexts.
src/​bcbench/​operations/​skills_operations.py Types skill configuration.
src/​bcbench/​operations/​instruction_operations.py Types instruction and agent configuration.
src/​bcbench/​operations/​dataquery_operations.py Types query result rows.
src/​bcbench/​evaluate/​dataquery.py Types the DataQuery agent runner.
src/​bcbench/​agent/​shared/​prompt.py Types prompt configuration.
src/​bcbench/​agent/​shared/​plugin.py Types plugin configuration.
src/​bcbench/​agent/​shared/​mcp_gateway.py Types JSON-RPC payloads and responses.
src/​bcbench/​agent/​shared/​lsp.py Types generated LSP configuration.
src/​bcbench/​agent/​copilot/​metrics.py Types Copilot tool records.
src/​bcbench/​agent/​claude/​metrics.py Types Claude tool records.
evaluator/​scores.py Types scorer metadata.
evaluator/​metrics.py Types metrics metadata.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@haoranpb
Sun Haoran (haoranpb) merged commit a45cf00 into main Oct 8, 2026
30 checks passed
@haoranpb
Sun Haoran (haoranpb) deleted the ty/strict-type-arguments branch October 8, 2026 09:09
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.

3 participants