diff --git a/ape_aws/accounts.py b/ape_aws/accounts.py index 8d96f99..f3c042f 100644 --- a/ape_aws/accounts.py +++ b/ape_aws/accounts.py @@ -1,18 +1,17 @@ -from json import dumps from functools import cached_property +from json import dumps from pathlib import Path from typing import Any, Iterator, Optional from ape.api.accounts import AccountAPI, AccountContainerAPI, TransactionAPI from ape.types import AddressType, MessageSignature, SignableMessage, TransactionSignature from ape.utils.validators import _validate_account_passphrase - +from eth_account import Account as EthAccount from eth_account._utils.legacy_transactions import serializable_unsigned_transaction_from_dict from eth_account.messages import _hash_eip191_message, encode_defunct -from eth_account import Account as EthAccount from eth_pydantic_types import HexBytes from eth_typing import Hash32 -from eth_utils import keccak, to_checksum_address, to_bytes +from eth_utils import keccak, to_bytes, to_checksum_address from .client import kms_client from .utils import _convert_der_to_rsv diff --git a/ape_aws/client.py b/ape_aws/client.py index 38b1a6d..f347109 100644 --- a/ape_aws/client.py +++ b/ape_aws/client.py @@ -1,13 +1,12 @@ -from cryptography.hazmat.primitives.asymmetric import ec, padding -from cryptography.hazmat.primitives import hashes, serialization -from cryptography.hazmat.backends import default_backend -from eth_account import Account - from datetime import datetime from typing import ClassVar -from pydantic import BaseModel, Field, ConfigDict, field_validator import boto3 # type: ignore[import] +from cryptography.hazmat.backends import default_backend +from cryptography.hazmat.primitives import hashes, serialization +from cryptography.hazmat.primitives.asymmetric import ec, padding +from eth_account import Account +from pydantic import BaseModel, ConfigDict, Field, field_validator class AliasResponse(BaseModel): diff --git a/ape_aws/kms/_cli.py b/ape_aws/kms/_cli.py index 2877385..a52ba14 100644 --- a/ape_aws/kms/_cli.py +++ b/ape_aws/kms/_cli.py @@ -1,14 +1,8 @@ import click - from ape.cli import ape_cli_context + from ape_aws.accounts import AwsAccountContainer, KmsAccount -from ape_aws.client import ( - CreateKey, - DeleteKey, - ImportKeyRequest, - ImportKey, - kms_client, -) +from ape_aws.client import CreateKey, DeleteKey, ImportKey, ImportKeyRequest, kms_client @click.group("kms")