Skip to content

Commit

Permalink
chore: linters
Browse files Browse the repository at this point in the history
  • Loading branch information
Karrenbelt committed Nov 26, 2022
1 parent c2af1b9 commit a5816bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions aea/cli/utils/click_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from collections import OrderedDict
from contextlib import contextmanager
from pathlib import Path
from typing import Any, Callable, List, Optional, Sequence, Type, Union, cast
from typing import Any, Callable, Generator, List, Optional, Sequence, Type, Union, cast

import click
from click import argument, option
Expand Down Expand Up @@ -385,7 +385,7 @@ def determine_package_type_for_directory(package_dir: Path) -> PackageType:


@contextmanager
def reraise_as_click_exception(*exceptions: Type[Exception]):
def reraise_as_click_exception(*exceptions: Type[Exception]) -> Generator:
"""Reraise exceptions as ClickException"""
try:
yield
Expand Down
1 change: 1 addition & 0 deletions scripts/whitelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,3 +330,4 @@
ACNWithBootstrappedEntryNodesDockerImage # unused class (aea/test_tools/acn_image.py:166)
default_method_call # unused method (aea/contracts/base.py:260)
send_control_c # unused method (aea/helpers/base.py:188)
reraise_as_click_exception # unused function (aea/cli/utils/click_utils.py:387)
2 changes: 1 addition & 1 deletion tests/test_cli/test_add/test_click_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_reraise_as_click_exception() -> None:
with pytest.raises(ValueError):
with pytest.raises(ZeroDivisionError):
raise ValueError()
assert False
raise AssertionError()

# 1. do not raise on pass
with reraise_as_click_exception():
Expand Down

0 comments on commit a5816bf

Please sign in to comment.