Skip to content

fix: resolve mypy strict errors in models.py and code_utils.py#2145

Merged
aseembits93 merged 2 commits intomainfrom
fix/mypy-strict-errors
May 8, 2026
Merged

fix: resolve mypy strict errors in models.py and code_utils.py#2145
aseembits93 merged 2 commits intomainfrom
fix/mypy-strict-errors

Conversation

@KRRT7
Copy link
Copy Markdown
Collaborator

@KRRT7 KRRT7 commented May 7, 2026

Summary

Stack

Part of #2132 linear stack (position 1). Replaces merged #2142.

KRRT7 added 2 commits May 7, 2026 17:46
- Fix return type of create_score_dictionary_from_metrics (dict[int, int] → dict[int, float])
- Restructure modify_addopts to eliminate type narrowing issues with TOMLDocument/ConfigParser branches
- Fix contextmanager return types (None → Generator[None, None, None])
- Replace function-attribute pattern in get_run_tmp_file with module-level state
- Add type: ignore[index] for tomlkit dynamic indexing
- Guard original_content restore with None check in add_addopts_to_pyproject
@KRRT7
Copy link
Copy Markdown
Collaborator Author

KRRT7 commented May 7, 2026

@aseembits93 can you merge this first? It's at the top of the #2132 stack — the rest of the PRs depend on it for clean prek/mypy passes.

@aseembits93 aseembits93 enabled auto-merge May 7, 2026 23:44
@aseembits93 aseembits93 merged commit 4a520d9 into main May 8, 2026
74 of 85 checks passed
@aseembits93 aseembits93 deleted the fix/mypy-strict-errors branch May 8, 2026 00:02
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