Skip to content
Merged
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
14 changes: 7 additions & 7 deletions pyrit/scenario/core/atomic_attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"""

import logging
import warnings
from typing import TYPE_CHECKING, Any, Optional

from pyrit.common.deprecation import print_deprecation_message
from pyrit.executor.attack import AttackExecutor, AttackStrategy
from pyrit.executor.attack.core.attack_executor import AttackExecutorResult
from pyrit.identifiers import build_atomic_attack_identifier
Expand Down Expand Up @@ -74,8 +74,8 @@ def __init__(
to ``atomic_attack_name``.
attack_technique: An AttackTechnique bundling the attack strategy and optional
technique seeds. Preferred over the deprecated ``attack`` parameter.
attack: Deprecated. The configured attack strategy to execute. Use
``attack_technique`` instead.
attack: **Deprecated.** Will be removed in v0.16.0. The configured attack
strategy to execute. Use ``attack_technique`` instead.
seed_groups: List of seed attack groups. Each seed group must
have an objective set.
adversarial_chat: Optional chat target for generating
Expand All @@ -99,10 +99,10 @@ def __init__(
if attack_technique is not None:
self._attack_technique = attack_technique
elif attack is not None:
warnings.warn(
"The 'attack' parameter is deprecated. Use 'attack_technique=AttackTechnique(attack=...)' instead.",
DeprecationWarning,
stacklevel=2,
print_deprecation_message(
old_item="AtomicAttack(attack=...)",
new_item="AtomicAttack(attack_technique=AttackTechnique(attack=...))",
removed_in="0.16.0",
)
self._attack_technique = AttackTechnique(attack=attack)
else:
Expand Down
Loading