mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-26 16:18:22 +00:00
src+tests: make flake8 happy; explicitly mark E722 ignores (bare excepts)
This commit is contained in:
parent
1c92002954
commit
be79a8cff4
4
.flake8
4
.flake8
@ -10,9 +10,9 @@ ignore =
|
||||
E402,
|
||||
# E501: line too long
|
||||
E501,
|
||||
# F403: star import used, unable to detect undefined names
|
||||
E741,
|
||||
# E741 ambiguous variable name
|
||||
E741,
|
||||
# F403: star import used, unable to detect undefined names
|
||||
F403,
|
||||
# F405: name may be undefined, or defined from star imports
|
||||
F405
|
||||
|
@ -477,7 +477,6 @@ class ConfirmState:
|
||||
return await dialog == CONFIRMED
|
||||
|
||||
|
||||
|
||||
_state = None # type: Optional[ConfirmState] # state for msg_register and msg_authenticate
|
||||
_lastreq = None # type: Optional[Msg] # last received register/authenticate request
|
||||
|
||||
|
@ -14,7 +14,7 @@ async def bootscreen():
|
||||
pin = await request_pin()
|
||||
if config.unlock(pin_to_int(pin), show_pin_timeout):
|
||||
return
|
||||
except:
|
||||
except: # noqa: E722
|
||||
pass
|
||||
|
||||
|
||||
|
@ -264,7 +264,7 @@ class wait(Syscall):
|
||||
def __iter__(self):
|
||||
try:
|
||||
return (yield self)
|
||||
except:
|
||||
except: # noqa: E722
|
||||
# exception was raised on the waiting task externally with
|
||||
# close() or throw(), kill the children tasks and re-raise
|
||||
self.exit()
|
||||
|
@ -1,4 +1,5 @@
|
||||
import sys
|
||||
|
||||
sys.path.append('../src')
|
||||
|
||||
from ubinascii import hexlify, unhexlify
|
||||
|
@ -82,7 +82,6 @@ class TestConfig(unittest.TestCase):
|
||||
self.assertEqual(v1, bytes())
|
||||
self.assertEqual(v2, value16)
|
||||
|
||||
|
||||
def test_change_pin(self):
|
||||
config.init()
|
||||
config.wipe()
|
||||
|
Loading…
Reference in New Issue
Block a user