Skip to content

Commit 42ad7cd

Browse files
committed
py/send_message: fix some lint warnings
1 parent 98bd177 commit 42ad7cd

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

py/bitbox02/bitbox02/bitbox02/bitbox02.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
from bitbox02.communication.generated import antiklepto_pb2 as antiklepto
4646
import google.protobuf.empty_pb2
4747

48-
# pylint: disable=unused-import
48+
# pylint: disable=unused-import,ungrouped-imports
4949
# We export it in __init__.py
5050
from bitbox02.communication.generated import system_pb2 as system
5151
except ModuleNotFoundError:
@@ -116,6 +116,9 @@ class BTCInputType(TypedDict):
116116

117117
class BTCOutputInternal:
118118
# TODO: Use NamedTuple, but not playing well with protobuf types.
119+
"""
120+
Internal transaction output (output belongs to BitBox).
121+
"""
119122

120123
def __init__(
121124
self,
@@ -135,6 +138,9 @@ def __init__(
135138

136139
class BTCOutputExternal:
137140
# TODO: Use NamedTuple, but not playing well with protobuf types.
141+
"""
142+
External transaction output.
143+
"""
138144

139145
def __init__(self, output_type: "btc.BTCOutputType.V", output_payload: bytes, value: int):
140146
self.type = output_type
@@ -807,6 +813,8 @@ def eth_sign(
807813
"""
808814
transaction should be given as a full rlp encoded eth transaction.
809815
"""
816+
# pylint: disable=no-member
817+
810818
is_eip1559 = transaction.startswith(b"\x02")
811819

812820
def handle_antiklepto(request: eth.ETHRequest) -> bytes:

py/send_message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def _setup_workflow(self) -> None:
197197
else:
198198
try:
199199
entropy_size = int(entropy_size_inp)
200-
except:
200+
except ValueError:
201201
eprint("Failed")
202202
return
203203

@@ -1531,7 +1531,7 @@ def _get_versions(self) -> None:
15311531

15321532
def _get_hardware(self) -> None:
15331533
secure_chip = self._device.hardware()["secure_chip_model"]
1534-
print(f"Hardware variant:")
1534+
print("Hardware variant:")
15351535
print(f"- Secure Chip: {secure_chip.value}")
15361536

15371537
def _erase(self) -> None:

0 commit comments

Comments
 (0)