Skip to content

Commit d117af2

Browse files
rlundeen2Copilot
andcommitted
Fix ty type check: make ScenarioResult identifier params optional
objective_target_identifier and objective_scorer_identifier may be None when deserializing from dicts. The printer bases already handle None. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 86172c9 commit d117af2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pyrit/models/scenario_result.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ def __init__(
9595
self,
9696
*,
9797
scenario_identifier: ScenarioIdentifier,
98-
objective_target_identifier: ComponentIdentifier,
98+
objective_target_identifier: ComponentIdentifier | None,
9999
attack_results: dict[str, list[AttackResult]],
100-
objective_scorer_identifier: ComponentIdentifier,
100+
objective_scorer_identifier: ComponentIdentifier | None,
101101
scenario_run_state: ScenarioRunState = "CREATED",
102102
labels: dict[str, str] | None = None,
103103
creation_time: datetime | None = None,

0 commit comments

Comments
 (0)