Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions capiscio_sdk/validators/message.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""Message validation logic."""
from typing import TYPE_CHECKING, Any, Dict, List
from ..types import ValidationResult, ValidationIssue, ValidationSeverity
from ..scoring import TrustScorer, AvailabilityScorer
# Import legacy scorer directly to avoid deprecation warning (we only use score_not_tested)
from ..scoring.availability import AvailabilityScorer as _LegacyAvailabilityScorer

if TYPE_CHECKING:
from ..scoring.types import ComplianceScore
Expand All @@ -19,8 +20,8 @@ class MessageValidator:
def __init__(self) -> None:
"""Initialize message validator."""
self._url_validator = URLSecurityValidator()
self._trust_scorer = TrustScorer()
self._availability_scorer = AvailabilityScorer()
# Use legacy scorer directly (not the deprecated wrapper) for score_not_tested()
self._availability_scorer = _LegacyAvailabilityScorer()

def validate(self, message: Dict[str, Any], skip_signature_verification: bool = True) -> ValidationResult:
"""
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"integration: marks tests as integration tests (require external services)",
"slow: marks tests as slow (deselect with '-m not slow')",
]

[tool.coverage.run]
source = ["capiscio_sdk"]
Expand Down
Loading