Fix pylint issues

This commit is contained in:
Charles-Edouard de la Vergne
2024-03-26 09:43:26 +01:00
parent 565c6fab66
commit fa3e87a06c
8 changed files with 134 additions and 138 deletions

View File

@@ -1,11 +1,13 @@
import json
import pytest
from web3 import Web3
from ledger_app_clients.ethereum.client import EthAppClient, StatusWord
from ragger.backend import BackendInterface
from ragger.firmware import Firmware
from ragger.navigator import Navigator, NavInsID
from ragger.error import ExceptionRAPDU
from ledger_app_clients.ethereum.client import EthAppClient, StatusWord
from web3 import Web3
from constants import ROOT_SNAPSHOT_PATH, ABIS_FOLDER
@@ -16,7 +18,7 @@ def test_blind_sign(firmware: Firmware,
navigator: Navigator):
app_client = EthAppClient(backend)
with open("%s/erc20.json" % (ABIS_FOLDER)) as file:
with open(f"{ABIS_FOLDER}/erc20.json", encoding="utf-8") as file:
contract = Web3().eth.contract(
abi=json.load(file),
address=None
@@ -41,7 +43,7 @@ def test_blind_sign(firmware: Firmware,
pass
assert e.value.status == StatusWord.INVALID_DATA
moves = list()
moves = []
if firmware.device.startswith("nano"):
if firmware.device == "nanos":
moves += [NavInsID.RIGHT_CLICK]