diff --git a/src/aleph_client/chains/cosmos.py b/src/aleph_client/chains/cosmos.py index 43dcd0a6..1a548531 100644 --- a/src/aleph_client/chains/cosmos.py +++ b/src/aleph_client/chains/cosmos.py @@ -5,7 +5,8 @@ import ecdsa from cosmospy._wallet import privkey_to_address, privkey_to_pubkey -from .common import BaseAccount, get_fallback_private_key, get_verification_buffer +from .common import (BaseAccount, get_fallback_private_key, + get_verification_buffer) DEFAULT_HRP = "cosmos" diff --git a/src/aleph_client/chains/ethereum.py b/src/aleph_client/chains/ethereum.py index f16bf448..961a5bae 100644 --- a/src/aleph_client/chains/ethereum.py +++ b/src/aleph_client/chains/ethereum.py @@ -5,12 +5,8 @@ from eth_account.messages import encode_defunct from eth_account.signers.local import LocalAccount -from .common import ( - BaseAccount, - get_fallback_private_key, - get_public_key, - get_verification_buffer, -) +from .common import (BaseAccount, get_fallback_private_key, get_public_key, + get_verification_buffer) class ETHAccount(BaseAccount): diff --git a/src/aleph_client/chains/nuls1.py b/src/aleph_client/chains/nuls1.py index eebc5738..4949d75d 100644 --- a/src/aleph_client/chains/nuls1.py +++ b/src/aleph_client/chains/nuls1.py @@ -8,12 +8,8 @@ from coincurve.keys import PrivateKey, PublicKey -from .common import ( - BaseAccount, - get_fallback_private_key, - get_public_key, - get_verification_buffer, -) +from .common import (BaseAccount, get_fallback_private_key, get_public_key, + get_verification_buffer) LOGGER = logging.getLogger("NULS") diff --git a/src/aleph_client/chains/nuls2.py b/src/aleph_client/chains/nuls2.py index 71841d99..852911d9 100644 --- a/src/aleph_client/chains/nuls2.py +++ b/src/aleph_client/chains/nuls2.py @@ -1,18 +1,10 @@ import base64 -from nuls2.model.data import ( - NETWORKS, - address_from_hash, - public_key_to_hash, - sign_recoverable_message, -) - -from .common import ( - BaseAccount, - get_fallback_private_key, - get_public_key, - get_verification_buffer, -) +from nuls2.model.data import (NETWORKS, address_from_hash, public_key_to_hash, + sign_recoverable_message) + +from .common import (BaseAccount, get_fallback_private_key, get_public_key, + get_verification_buffer) def get_address(public_key=None, private_key=None, chain_id=1, prefix="NULS"): diff --git a/src/aleph_client/chains/tezos.py b/src/aleph_client/chains/tezos.py index 4d3bc697..4d0ddb12 100644 --- a/src/aleph_client/chains/tezos.py +++ b/src/aleph_client/chains/tezos.py @@ -6,7 +6,8 @@ from nacl.public import SealedBox from nacl.signing import SigningKey -from .common import BaseAccount, get_fallback_private_key, get_verification_buffer +from .common import (BaseAccount, get_fallback_private_key, + get_verification_buffer) class TezosAccount(BaseAccount): diff --git a/src/aleph_client/commands/program.py b/src/aleph_client/commands/program.py index d6ee3017..4ad5aa46 100644 --- a/src/aleph_client/commands/program.py +++ b/src/aleph_client/commands/program.py @@ -6,23 +6,15 @@ from zipfile import BadZipFile import typer -from aleph_message.models import ( - MessagesResponse, - ProgramContent, - ProgramMessage, - StoreMessage, -) +from aleph_message.models import (MessagesResponse, ProgramContent, + ProgramMessage, StoreMessage) from aleph_client import AuthenticatedUserSession from aleph_client.account import _load_account from aleph_client.commands import help_strings -from aleph_client.commands.utils import ( - input_multiline, - prompt_for_volumes, - setup_logging, - volume_to_dict, - yes_no_input, -) +from aleph_client.commands.utils import (input_multiline, prompt_for_volumes, + setup_logging, volume_to_dict, + yes_no_input) from aleph_client.conf import settings from aleph_client.types import AccountFromPrivateKey, StorageEnum from aleph_client.utils import create_archive diff --git a/src/aleph_client/user_session.py b/src/aleph_client/user_session.py index 59064c18..f53af4f4 100644 --- a/src/aleph_client/user_session.py +++ b/src/aleph_client/user_session.py @@ -7,51 +7,25 @@ import time from datetime import datetime from pathlib import Path -from typing import ( - Any, - AsyncIterable, - Awaitable, - Callable, - Dict, - Iterable, - List, - Mapping, - NoReturn, - Optional, - Tuple, - Type, - TypeVar, - Union, -) +from typing import (Any, AsyncIterable, Awaitable, Callable, Dict, Iterable, + List, Mapping, NoReturn, Optional, Tuple, Type, TypeVar, + Union) import aiohttp -from aleph_message.models import ( - AggregateContent, - AggregateMessage, - AlephMessage, - ForgetContent, - ForgetMessage, - ItemType, - Message, - MessageType, - PostContent, - PostMessage, - ProgramMessage, - StoreContent, - StoreMessage, -) +from aleph_message.models import (AggregateContent, AggregateMessage, + AlephMessage, ForgetContent, ForgetMessage, + ItemType, Message, MessageType, PostContent, + PostMessage, ProgramMessage, StoreContent, + StoreMessage) from aleph_message.models.program import Encoding, ProgramContent from pydantic import ValidationError -from aleph_client.types import Account, GenericMessage, MessageStatus, StorageEnum +from aleph_client.types import (Account, GenericMessage, MessageStatus, + StorageEnum) from .conf import settings -from .exceptions import ( - BroadcastError, - InvalidMessageError, - MessageNotFoundError, - MultipleMessagesError, -) +from .exceptions import (BroadcastError, InvalidMessageError, + MessageNotFoundError, MultipleMessagesError) from .models import MessagesResponse from .utils import get_message_type_value diff --git a/src/aleph_client/vm/app.py b/src/aleph_client/vm/app.py index 0077885e..5467b2a4 100644 --- a/src/aleph_client/vm/app.py +++ b/src/aleph_client/vm/app.py @@ -1,14 +1,6 @@ from dataclasses import dataclass -from typing import ( - Any, - Awaitable, - Callable, - Dict, - List, - Mapping, - MutableMapping, - Optional, -) +from typing import (Any, Awaitable, Callable, Dict, List, Mapping, + MutableMapping, Optional) AsgiApplication = Callable diff --git a/tests/unit/test_asynchronous.py b/tests/unit/test_asynchronous.py index de4b5963..5c81003e 100644 --- a/tests/unit/test_asynchronous.py +++ b/tests/unit/test_asynchronous.py @@ -2,13 +2,8 @@ from unittest.mock import AsyncMock, MagicMock import pytest as pytest -from aleph_message.models import ( - AggregateMessage, - ForgetMessage, - PostMessage, - ProgramMessage, - StoreMessage, -) +from aleph_message.models import (AggregateMessage, ForgetMessage, PostMessage, + ProgramMessage, StoreMessage) from aleph_client import AuthenticatedUserSession from aleph_client.types import Account, MessageStatus, StorageEnum diff --git a/tests/unit/test_chain_nuls1_compat.py b/tests/unit/test_chain_nuls1_compat.py index 65869162..5957a3e4 100644 --- a/tests/unit/test_chain_nuls1_compat.py +++ b/tests/unit/test_chain_nuls1_compat.py @@ -10,7 +10,8 @@ from coincurve.keys import PrivateKey from aleph_client.chains.common import get_fallback_private_key -from aleph_client.chains.nuls1 import LOGGER, MESSAGE_TEMPLATE, NulsSignature, VarInt +from aleph_client.chains.nuls1 import (LOGGER, MESSAGE_TEMPLATE, NulsSignature, + VarInt) SECRET = ( b"\xc4\xfe\xe65\x96\x14\xb4:\r: \x05;\x12j\x9bJ" diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 0671bf24..1a40936a 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -1,11 +1,5 @@ -from aleph_message.models import ( - AggregateMessage, - ForgetMessage, - MessageType, - PostMessage, - ProgramMessage, - StoreMessage, -) +from aleph_message.models import (AggregateMessage, ForgetMessage, MessageType, + PostMessage, ProgramMessage, StoreMessage) from aleph_client.utils import get_message_type_value