Skip to content

Commit cdbcfcb

Browse files
committed
fix: imports ordering & var assignment to satisfy the pre-commit check
1 parent 4d2f31c commit cdbcfcb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

examples/example_utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import getpass
12
import json
23
import os
3-
import getpass
44

55
import eth_account
66
from eth_account.signers.local import LocalAccount
@@ -28,6 +28,7 @@ def setup(base_url=None, skip_ws=False, perp_dexs=None):
2828

2929

3030
def create_account(config):
31+
account: LocalAccount
3132
if config["keystore_path"]:
3233
keystore_path = config["keystore_path"]
3334
keystore_path = os.path.expanduser(keystore_path)
@@ -41,9 +42,9 @@ def create_account(config):
4142
keystore = json.load(f)
4243
password = getpass.getpass("Enter keystore password: ")
4344
private_key = eth_account.Account.decrypt(keystore, password)
44-
account: LocalAccount = eth_account.Account.from_key(private_key)
45+
account = eth_account.Account.from_key(private_key)
4546
else:
46-
account: LocalAccount = eth_account.Account.from_key(config["secret_key"])
47+
account = eth_account.Account.from_key(config["secret_key"])
4748
address = config["account_address"]
4849
if address == "":
4950
address = account.address

0 commit comments

Comments
 (0)