mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
flake8: add typing imports where missing
also remove autoflake workarounds from some files, apparently newer autoflake can recognize them properly
This commit is contained in:
parent
68da6881b5
commit
f236eb9cf2
@ -5,4 +5,4 @@ flake8
|
||||
protobuf
|
||||
isort
|
||||
black; python_version >= "3.6"
|
||||
autoflake
|
||||
autoflake>=1.2
|
||||
|
@ -32,7 +32,7 @@ arithmetic, so we cannot handle secrets without risking their disclosure.
|
||||
"""
|
||||
|
||||
import hashlib
|
||||
from typing import NewType, Tuple
|
||||
from typing import List, NewType, Tuple
|
||||
|
||||
Point = NewType("Point", Tuple[int, int, int, int])
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
|
||||
|
||||
import logging
|
||||
from typing import Optional
|
||||
from typing import Optional, Set, Type
|
||||
|
||||
from . import protobuf
|
||||
|
||||
|
@ -15,15 +15,11 @@
|
||||
# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
|
||||
|
||||
import logging
|
||||
from typing import Iterable, List, Set, Type
|
||||
from typing import Iterable, List, Type
|
||||
|
||||
from ..exceptions import TrezorException
|
||||
from ..protobuf import MessageType
|
||||
|
||||
if False:
|
||||
# mark Set and List as used, otherwise they only exist in comments
|
||||
List, Set
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
# USB vendor/product IDs for Trezors
|
||||
|
@ -24,10 +24,6 @@ import requests
|
||||
from . import Transport, TransportException
|
||||
from .. import mapping, protobuf
|
||||
|
||||
if False:
|
||||
# mark Optional as used, otherwise it only exists in comments
|
||||
Optional
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
TREZORD_HOST = "http://127.0.0.1:21325"
|
||||
|
@ -20,10 +20,6 @@ from typing import Iterable, Optional, cast
|
||||
from . import TransportException
|
||||
from .protocol import ProtocolBasedTransport, get_protocol
|
||||
|
||||
if False:
|
||||
# mark Optional as used, otherwise it only exists in comments
|
||||
Optional
|
||||
|
||||
|
||||
class UdpTransport(ProtocolBasedTransport):
|
||||
|
||||
|
@ -31,10 +31,6 @@ except Exception as e:
|
||||
LOG.warning("WebUSB transport is disabled: {}".format(e))
|
||||
usb1 = None
|
||||
|
||||
if False:
|
||||
# mark Optional as used, otherwise it only exists in comments
|
||||
Optional
|
||||
|
||||
INTERFACE = 0
|
||||
ENDPOINT = 1
|
||||
DEBUG_INTERFACE = 1
|
||||
|
Loading…
Reference in New Issue
Block a user