chore(py-ext-marketplace): drop unused _evaluators init in QualityAssessor#2154
Merged
imran-siddique merged 1 commit intoMay 12, 2026
Conversation
…essor
`QualityAssessor.__init__` only set `self._evaluators: dict[AssessmentDimension, Any] = {}`
and nothing else on the instance. The attribute is never read, written, or
mutated anywhere in the source tree — none of the `assess_*` methods consult
it, no caller touches it, and the tests do not reference it.
Since the only purpose of the constructor was that dead assignment, drop the
empty `__init__` entirely. `Any` remains imported because `to_dict` still uses
`dict[str, Any]` as its return annotation.
If pluggable evaluators are added later, they should be introduced together
with the registration path and the call site that uses them.
Surfaced during independent audit conducted by @finnoybu (Ken Tannenbaum, AEGIS Initiative); [LOW, Python Extensions].
🤖 AI Agent: test-generator — View detailsTest coverage looks good. No gaps identified. |
🤖 AI Agent: breaking-change-detector — API CompatibilityAPI Compatibility
|
🤖 AI Agent: docs-sync-checker — Docs SyncDocs SyncDocumentation is in sync. |
🤖 AI Agent: code-reviewer — View detailsTL;DR: 0 blockers, 0 warnings. No issues found. Clean change. |
🤖 AI Agent: security-scanner — View detailsNo security issues found. |
|
🟡 Contributor Check: MEDIUM
Automated check by AGT Contributor Check. |
PR Review Summary
Verdict: ✅ Ready for human review |
MohammadHaroonAbuomar
pushed a commit
to MohammadHaroonAbuomar/agt-acs
that referenced
this pull request
Jun 1, 2026
…essor (microsoft#2154) `QualityAssessor.__init__` only set `self._evaluators: dict[AssessmentDimension, Any] = {}` and nothing else on the instance. The attribute is never read, written, or mutated anywhere in the source tree — none of the `assess_*` methods consult it, no caller touches it, and the tests do not reference it. Since the only purpose of the constructor was that dead assignment, drop the empty `__init__` entirely. `Any` remains imported because `to_dict` still uses `dict[str, Any]` as its return annotation. If pluggable evaluators are added later, they should be introduced together with the registration path and the call site that uses them. Surfaced during independent audit conducted by @finnoybu (Ken Tannenbaum, AEGIS Initiative); [LOW, Python Extensions].
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
QualityAssessor.__init__only sets:…and nothing else on the instance. The attribute is never read, written, or mutated anywhere in the source tree — none of the
assess_*methods consult it, no caller touches it, and the tests do not reference it.A repo-wide
grep -rn '_evaluators'confirmsQualityAssessoris the only producer; all other_evaluatorsmatches belong to unrelated classes inagent_sandboxandagentmesh.governance.policy.Change
Since the only purpose of the constructor was that dead assignment, drop the empty
__init__entirely.Anyremains imported becauseto_dictstill usesdict[str, Any]as its return annotation.If pluggable evaluators are added later, they should be introduced together with the registration path and the call site that uses them.
Tests
No behavioural change; the existing suite continues to pass.
Test plan
QualityAssessor()still instantiates (covered by the existingtests/test_quality_assessment.py::TestQualityAssessorclass).Surfaced during independent audit conducted by @finnoybu (Ken Tannenbaum, AEGIS Initiative); [LOW, Python Extensions].