Skip to content

Conversation

matejcik
Copy link
Contributor

in all cases where Python code checks for T2B1, the same should apply for T3B1.

complement to #4072

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.
@matejcik matejcik requested a review from mmilata August 28, 2024 08:50
@matejcik matejcik self-assigned this Aug 28, 2024
@matejcik matejcik force-pushed the matejcik/t3b1-inclusion branch from c3d9499 to b54eeb0 Compare August 28, 2024 13:03
@trezor trezor deleted a comment from github-actions bot Aug 28, 2024
also convert "INTERNAL_MODEL in (tuple)" to equality comparisons, see
previous commit

[no changelog]
@matejcik matejcik force-pushed the matejcik/t3b1-inclusion branch from b54eeb0 to 97ebabf Compare August 28, 2024 13:47
Copy link
Member

@mmilata mmilata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool pylint plugin.

Wondering where else we should add T3B1. Do we want to build firmware images in CI? Emulators too?

@matejcik
Copy link
Contributor Author

let's discuss after standup

@matejcik matejcik merged commit 21988d6 into main Aug 29, 2024
82 of 84 checks passed
@matejcik matejcik deleted the matejcik/t3b1-inclusion branch August 29, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants