Skip to content

Commit

Permalink
mypy test ignore due to rare case of inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-schott committed Mar 2, 2020
1 parent b0c8c5a commit 0efe969
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion foolbox/attacks/spatial_attack.py
Expand Up @@ -50,7 +50,7 @@ def __init__(
self.random_steps = random_steps

def __call__( # type: ignore
self, model: Model, inputs: T, criterion: Union[Criterion, T],
self, model: Model, inputs: T, criterion: Any, **kwargs: Any,
) -> Tuple[T, T, T]:
x, restore_type = ep.astensor_(inputs)
del inputs
Expand Down
3 changes: 1 addition & 2 deletions tests/test_spatial_attack.py
Expand Up @@ -36,6 +36,5 @@ def test_spatial_attacks(
fmodel = fmodel.transform_bounds((0, 1))
acc = fbn.accuracy(fmodel, x, y)
assert acc > 0

advs, _, _ = attack(fmodel, x, y)
advs, _, _ = attack(fmodel, x, y) # type: ignore
assert fbn.accuracy(fmodel, advs, y) < acc

0 comments on commit 0efe969

Please sign in to comment.