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

core: make mypy happy about importing fatfs

This commit is contained in:
matejcik 2020-04-17 11:03:53 +02:00 committed by matejcik
parent 7f2e7b0003
commit 63dfcb17a7

View File

@ -1,4 +1,10 @@
import trezorconfig as config # noqa: F401 import trezorconfig as config # noqa: F401
import trezorio as io # noqa: F401 import trezorio as io # noqa: F401
if False:
import trezorio.fatfs as fatfs
else:
# a bug in mypy causes a crash at _usage site_ of the following:
fatfs = io.fatfs fatfs = io.fatfs
# hence the if False branch that does what mypy understands - but which doesn't
# actually work because `trezorio.fatfs` is not importable.