1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-28 00:58:09 +00:00

src+tests: make flake8 happy; explicitly mark E722 ignores (bare excepts)

This commit is contained in:
Pavol Rusnak 2018-02-27 00:29:00 +01:00
parent 1c92002954
commit be79a8cff4
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
6 changed files with 5 additions and 6 deletions

View File

@ -10,9 +10,9 @@ ignore =
E402, E402,
# E501: line too long # E501: line too long
E501, E501,
# F403: star import used, unable to detect undefined names
E741,
# E741 ambiguous variable name # E741 ambiguous variable name
E741,
# F403: star import used, unable to detect undefined names
F403, F403,
# F405: name may be undefined, or defined from star imports # F405: name may be undefined, or defined from star imports
F405 F405

View File

@ -477,7 +477,6 @@ class ConfirmState:
return await dialog == CONFIRMED return await dialog == CONFIRMED
_state = None # type: Optional[ConfirmState] # state for msg_register and msg_authenticate _state = None # type: Optional[ConfirmState] # state for msg_register and msg_authenticate
_lastreq = None # type: Optional[Msg] # last received register/authenticate request _lastreq = None # type: Optional[Msg] # last received register/authenticate request

View File

@ -14,7 +14,7 @@ async def bootscreen():
pin = await request_pin() pin = await request_pin()
if config.unlock(pin_to_int(pin), show_pin_timeout): if config.unlock(pin_to_int(pin), show_pin_timeout):
return return
except: except: # noqa: E722
pass pass

View File

@ -264,7 +264,7 @@ class wait(Syscall):
def __iter__(self): def __iter__(self):
try: try:
return (yield self) return (yield self)
except: except: # noqa: E722
# exception was raised on the waiting task externally with # exception was raised on the waiting task externally with
# close() or throw(), kill the children tasks and re-raise # close() or throw(), kill the children tasks and re-raise
self.exit() self.exit()

View File

@ -1,4 +1,5 @@
import sys import sys
sys.path.append('../src') sys.path.append('../src')
from ubinascii import hexlify, unhexlify from ubinascii import hexlify, unhexlify

View File

@ -82,7 +82,6 @@ class TestConfig(unittest.TestCase):
self.assertEqual(v1, bytes()) self.assertEqual(v1, bytes())
self.assertEqual(v2, value16) self.assertEqual(v2, value16)
def test_change_pin(self): def test_change_pin(self):
config.init() config.init()
config.wipe() config.wipe()