Skip to content

Commit eb3e2ef

Browse files
committed
Resolving style check failures
1 parent 2c1fe19 commit eb3e2ef

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

art/attacks/evasion/adversarial_patch/adversarial_patch_pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ def generate( # type: ignore
512512
raise ValueError("Masks can only be used if the `patch_location` is `None`.")
513513

514514
if y is None and self.targeted:
515-
raise ValueError("The targeted version of AdversarialPatch attack requires provided target labels.")
515+
raise ValueError("The targeted version of AdversarialPatch attack requires provided target labels.")
516516

517517
if hasattr(self.estimator, "nb_classes"):
518518

art/attacks/evasion/dpatch_robust.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ def generate( # type: ignore
155155
if y is None and self.targeted:
156156
raise ValueError("The targeted version of RobustDPatch attack requires target labels provided to `y`.")
157157
if y is not None and not self.targeted:
158-
raise ValueError("The untargeted version of RobustDPatch attack does not use target labels provided to 'y'.")
158+
raise ValueError(
159+
"The untargeted version of RobustDPatch attack does not use target labels provided to 'y'."
160+
)
159161
if x.ndim != 4: # pragma: no cover
160162
raise ValueError("The adversarial patch can only be applied to images.")
161163

0 commit comments

Comments
 (0)