mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-28 16:21:03 +00:00
fix style after rebase
This commit is contained in:
parent
ec389e227c
commit
30dc6bea06
@ -132,7 +132,7 @@ class Channel:
|
||||
# TODO Check CRC and if valid, check tag, if valid update nonces
|
||||
self._finish_fallback()
|
||||
# TODO self.write() failure device is busy - use channel buffer to send this failure message!!
|
||||
return
|
||||
return None
|
||||
return received_message_handler.handle_received_message(self, buffer)
|
||||
elif self.expected_payload_length + INIT_HEADER_LENGTH > self.bytes_read:
|
||||
self.is_cont_packet_expected = True
|
||||
|
@ -1,3 +1,4 @@
|
||||
# flake8: noqa: F403,F405
|
||||
from common import * # isort:skip
|
||||
|
||||
import storage.cache_codec
|
||||
|
@ -1,3 +1,4 @@
|
||||
# flake8: noqa: F403,F405
|
||||
from common import * # isort:skip
|
||||
|
||||
import storage.cache_codec
|
||||
|
@ -378,7 +378,7 @@ class TestStorageCache(unittest.TestCase):
|
||||
session_id = cache_codec.start_session()
|
||||
self.assertEqual(cache_codec.start_session(session_id), session_id)
|
||||
get_active_session().set(KEY, b"A")
|
||||
for i in range(_PROTOCOL_CACHE._MAX_SESSIONS_COUNT):
|
||||
for _ in range(_PROTOCOL_CACHE._MAX_SESSIONS_COUNT):
|
||||
cache_codec.start_session()
|
||||
self.assertNotEqual(cache_codec.start_session(session_id), session_id)
|
||||
self.assertIsNone(get_active_session().get(KEY))
|
||||
|
@ -1,3 +1,4 @@
|
||||
# flake8: noqa: F403,F405
|
||||
from common import * # isort:skip
|
||||
|
||||
if utils.USE_THP:
|
||||
|
@ -1,3 +1,4 @@
|
||||
# flake8: noqa: F403,F405
|
||||
from common import * # isort:skip
|
||||
from trezorcrypto import aesgcm, curve25519
|
||||
|
||||
@ -101,8 +102,8 @@ class TestTrezorHostProtocolCrypto(unittest.TestCase):
|
||||
|
||||
def test_iv_from_nonce(self):
|
||||
for v in self.vectors_iv:
|
||||
x = v[0]
|
||||
y = x.to_bytes(8, "big")
|
||||
# x = v[0]
|
||||
# y = x.to_bytes(8, "big")
|
||||
iv = crypto._get_iv_from_nonce(v[0])
|
||||
self.assertEqual(iv, v[1])
|
||||
with self.assertRaises(AssertionError) as e:
|
||||
|
@ -1,3 +1,4 @@
|
||||
# flake8: noqa: F403,F405
|
||||
from common import * # isort:skip
|
||||
from mock_wire_interface import MockHID
|
||||
from trezor import config, io, protobuf
|
||||
@ -256,7 +257,7 @@ class TestTrezorHostProtocol(unittest.TestCase):
|
||||
|
||||
# test invalid tag in handshake phase
|
||||
cid_2 = get_channel_id_from_response(expected_response_1)
|
||||
cid_2_bytes = cid_2.to_bytes(2, "big")
|
||||
# cid_2_bytes = cid_2.to_bytes(2, "big")
|
||||
channel = thp_main._CHANNELS[cid_2]
|
||||
channel.iface = self.interface
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
# flake8: noqa: F403,F405
|
||||
from common import * # isort:skip
|
||||
|
||||
from typing import Any, Awaitable
|
||||
|
@ -1,3 +1,4 @@
|
||||
# flake8: noqa: F403,F405
|
||||
from common import * # isort:skip
|
||||
import ustruct
|
||||
from typing import TYPE_CHECKING
|
||||
|
@ -1,3 +1,4 @@
|
||||
# flake8: noqa: F403,F405
|
||||
from trezor import utils
|
||||
from trezor.wire.thp import ChannelState
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user