refactor(safety): apply consistent formatting across services and tests
Improved code readability and uniformity by standardizing line breaks, indentation, and inline conditions across safety-related services, models, and tests, including content filters, validation rules, and emergency controls.
This commit is contained in:
@@ -220,7 +220,9 @@ class TestScan:
|
||||
filter_all: ContentFilter,
|
||||
) -> None:
|
||||
"""Test scanning for specific categories only."""
|
||||
content = "Email: test@example.com, token: ghp_abc123456789012345678901234567890123"
|
||||
content = (
|
||||
"Email: test@example.com, token: ghp_abc123456789012345678901234567890123"
|
||||
)
|
||||
|
||||
# Scan only for secrets
|
||||
matches = await filter_all.scan(
|
||||
|
||||
@@ -321,8 +321,7 @@ class TestLoadRulesFromPolicy:
|
||||
validator.load_rules_from_policy(policy)
|
||||
|
||||
approval_rules = [
|
||||
r for r in validator._rules
|
||||
if r.decision == SafetyDecision.REQUIRE_APPROVAL
|
||||
r for r in validator._rules if r.decision == SafetyDecision.REQUIRE_APPROVAL
|
||||
]
|
||||
assert len(approval_rules) == 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user