chore: enforce @override via mypy explicit-override rule#12451
Merged
Conversation
fregataa
added a commit
that referenced
this pull request
Jun 30, 2026
9d97f14 to
e092a21
Compare
HyeockJinKim
previously approved these changes
Jun 30, 2026
seedspirit
previously approved these changes
Jun 30, 2026
e092a21 to
2f4880e
Compare
cb72e5e to
01901b0
Compare
1f7d263 to
67a0f1e
Compare
fregataa
added a commit
that referenced
this pull request
Jul 2, 2026
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
32c21ed to
a70040f
Compare
fregataa
added a commit
that referenced
this pull request
Jul 2, 2026
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
a70040f to
6df924c
Compare
d128459 to
6df924c
Compare
Enable mypy's explicit-override error code and add the 2672 missing @OverRide decorators across 609 files, driven by mypy's own diagnostics. Every method overriding a base-class method now carries @typing.override. ai.backend.client.cli.pretty is exempted per-module: its `total` property overrides tqdm's `total` instance attribute (not a method), which mypy cannot recognise @OverRide on regardless of decorator placement. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
7b8d426 to
7c5241b
Compare
jopemachine
approved these changes
Jul 2, 2026
HyeockJinKim
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
explicit-overrideerror code ([tool.mypy].enable_error_code) so every method overriding a base-class method must carry@typing.override.@overridedecorators across 609 files (driven by mypy's own diagnostics for precision, including cross-module base classes).ai.backend.client.cli.prettyper-module: itstotalproperty overrides tqdm'stotal, which is an instance attribute (not a method), and mypy cannot recognise@overrideon a property overriding a base variable regardless of decorator placement.Test plan
pants check ::→ Success, no issues found in 6291 source filespants lint --changed-since=origin/main→ All checks passedpants fmt :: && pants fix ::→ clean📚 Documentation preview 📚: https://sorna--12451.org.readthedocs.build/en/12451/
📚 Documentation preview 📚: https://sorna-ko--12451.org.readthedocs.build/ko/12451/