Skip to content

Commit f900d99

Browse files
purelitureclaude
andcommitted
fix(verifier): resolve CodeQL no-effect Protocol stub
VerifierStrategy.verify used `...` as its body, which CodeQL flags as py/ineffectual-statement and which also diverged from the existing FindingVerifier Protocol house style. Use a docstring body instead, and drop the now-redundant quoted forward reference (UP037, future annotations). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 74ae9d1 commit f900d99

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/security_scanner/core/evaluation/verifier_harness.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
class VerifierStrategy(Protocol):
4343
"""Structural type for a candidate-to-result verifier strategy."""
4444

45-
def verify(self, finding: Finding) -> VerifierResult: ...
45+
def verify(self, finding: Finding) -> VerifierResult:
46+
"""Return a verifier result for one finding."""
4647

4748

4849
@dataclass(frozen=True)
@@ -83,7 +84,7 @@ def verify(self, finding: Finding) -> VerifierResult:
8384
@classmethod
8485
def from_file(
8586
cls, path: str | Path, *, min_confidence: float = 0.60
86-
) -> "RecordedVerifierStrategy":
87+
) -> RecordedVerifierStrategy:
8788
data = json.loads(Path(path).read_text(encoding="utf-8"))
8889
if not isinstance(data, Mapping):
8990
raise ValueError("Recorded responses file must contain a JSON object.")

0 commit comments

Comments
 (0)