fix(lint): apply ruff format to security_scan_hooks_steps.py
CI / push-validation (pull_request) Successful in 22s
CI / helm (pull_request) Successful in 30s
CI / build (pull_request) Successful in 32s
CI / lint (pull_request) Successful in 46s
CI / quality (pull_request) Successful in 50s
CI / typecheck (pull_request) Successful in 58s
CI / security (pull_request) Successful in 1m52s
CI / unit_tests (pull_request) Successful in 6m43s
CI / integration_tests (pull_request) Successful in 8m50s
CI / docker (pull_request) Successful in 1m29s
CI / coverage (pull_request) Successful in 9m33s
CI / status-check (pull_request) Successful in 3s

This commit is contained in:
2026-06-02 15:33:31 -04:00
parent a7dd0b6b04
commit b408993834
+5 -7
View File
@@ -282,7 +282,9 @@ def step_semgrep_rule_has_reraise_pattern_not(context: Any, rule_id: str) -> Non
break
# Also handle nested pattern-either blocks inside alternation groups
nested_either = alt.get("pattern-either") if isinstance(alt, dict) else None
nested_either = (
alt.get("pattern-either") if isinstance(alt, dict) else None
)
if isinstance(nested_either, list):
for nested_alt in nested_either:
pn = nested_alt.get("pattern-not", "")
@@ -333,15 +335,11 @@ def step_read_lint_session(context: Any) -> None:
def step_lint_session_has_semgrep(context: Any) -> None:
source = context.lint_session_source
if "semgrep" not in source.lower():
raise AssertionError(
"lint session does not contain a semgrep invocation"
)
raise AssertionError("lint session does not contain a semgrep invocation")
@then('the lint session source should reference ".semgrep.yml"')
def step_lint_session_references_semgrep_yml(context: Any) -> None:
source = context.lint_session_source
if ".semgrep.yml" not in source:
raise AssertionError(
"lint session does not reference '.semgrep.yml'"
)
raise AssertionError("lint session does not reference '.semgrep.yml'")