1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00
Commit Graph

2 Commits

Author SHA1 Message Date
matejcik
43677c6afd style(core): add check for utils.INTERNAL_MODEL in (tuple)
The static replacer doesn't understand tuples (it's just a dumb sed,
we'd need to teach it the python ast which is a somewhat bigger project
that would also make the build slower)
so instead we spell out every "utils.INTERNAL_MODEL == xyz" equality
check separately.

If you don't, you don't get static replacement and you're checking at
run-time in every firmware for every device.

This pylint will catch the problem.
2024-08-29 10:56:21 +02:00
matejcik
f0d6539d3d feat: custom Pylint plugin
for now, it catches the following incorrect function:

async def show_foo() -> Awaitable[None]:
    return show_something_else("foo")

because to correctly show the result, the caller would have to "await (await show_foo())"

(this should either be "async def show_foo() -> None", or "def show_foo() -> Awaitable[None]")
2023-11-30 09:27:57 +01:00