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

25 Commits

Author SHA1 Message Date
matejcik
a5aa515631 style(python): upgrade to pyright 1.1.361
had to add a typestub for PIL due to
https://github.com/microsoft/pyright/issues/7832

We should remove it if that is either fixed or, if I fail to convince
Eric, after the relevant type information is added to Pillow

[no changelog]
2024-05-07 11:57:10 +02:00
matejcik
185cf04063 chore(python): drop source support for Python 3.6 and 3.7 2024-02-12 14:49:32 +01:00
matejcik
7d8a57a806 style(python): use 'h' for hardening instead of apostrophe (fixes #3037) 2023-10-20 15:45:32 +02:00
matejcik
c3a4a765bb build(deps): update poetry env to Python 3.8, update Pillow 2023-10-16 13:51:36 +02:00
matejcik
b5c541d8fd style(python): extend style checks to more targets
[no changelog]
2023-08-16 13:29:51 +02:00
matejcik
6cd174d540 feat: toiftool 2023-08-16 12:47:14 +02:00
matejcik
799c420dda fix(python): support all image types in firmware-fingerprint.py
[no changelog]
2023-04-05 16:36:29 +02:00
matejcik
00304471ca feat(python): add pybridge tool
[no changelog]
2023-02-20 14:59:02 +01:00
matejcik
a7482f4c6a refactor(python): convert firmware parsing to classes 2022-11-01 14:56:00 +01:00
grdddj
e3d366e65b feat(python): ScriptUI for trezorctl, reference client implementation 2022-01-12 14:52:01 +01:00
matejcik
38fca4a83d chore(python): regenerate GNU copyright headers 2021-12-07 16:55:58 +01:00
matejcik
6d3b49934a chore(python/tools): bump version in encfs_aes_getpass 2021-11-26 16:28:49 +01:00
grdddj
1a0b590914 feat(python): add full type information
WIP - typing the trezorctl apps

typing functions trezorlib/cli

addressing most of mypy issue for trezorlib apps and _internal folder

fixing broken device tests by changing asserts in debuglink.py

addressing most of mypy issues in trezorlib/cli folder

adding types to some untyped functions, mypy section in setup.cfg

typing what can be typed, some mypy fixes, resolving circular import issues

importing type objects in "if TYPE_CHECKING:" branch

fixing CI by removing assert in emulator, better ignore comments

CI assert fix, style fixes, new config options

fixup! CI assert fix, style fixes, new config options

type fixes after rebasing on master

fixing python3.6 and 3.7 unittests by importing Literal from typing_extensions

couple mypy and style fixes

fixes and improvements from code review

silencing all but one mypy issues

trial of typing the tools.expect function

fixup! trial of typing the tools.expect function

@expect and @session decorators correctly type-checked

Optional args in CLI where relevant, not using general list/tuple/dict where possible

python/Makefile commands, adding them into CI, ignoring last mypy issue

documenting overload for expect decorator, two mypy fixes coming from that

black style fix

improved typing of decorators, pyright config file

addressing or ignoring pyright errors, replacing mypy in CI by pyright

fixing incomplete assert causing device tests to fail

pyright issue that showed in CI but not locally, printing pyright version in CI

fixup! pyright issue that showed in CI but not locally, printing pyright version in CI

unifying type:ignore statements for pyright usage

resolving PIL.Image issues, pyrightconfig not excluding anything

replacing couple asserts with TypeGuard on safe_issubclass

better error handling of usb1 import for webusb

better error handling of hid import

small typing details found out by strict pyright mode

improvements from code review

chore(python): changing List to Sequence for protobuf messages

small code changes to reflect the protobuf change to Sequence

importing TypedDict from typing_extensions to support 3.6 and 3.7

simplify _format_access_list function

fixup! simplify _format_access_list function

typing tools folder

typing helper-scripts folder

some click typing

enforcing all functions to have typed arguments

reverting the changed argument name in tools

replacing TransportType with Transport

making PinMatrixRequest.type protobuf attribute required

reverting the protobuf change, making argument into get_pin Optional

small fixes in asserts

solving the session decorator type issues

fixup! solving the session decorator type issues

improvements from code review

fixing new pyright errors introduced after version increase

changing -> Iterable to -> Sequence in enumerate_devices, change in wait_for_devices

style change in debuglink.py

chore(python): adding type annotation to Sequences in messages.py

better "self and cls" types on Transport

fixup! better "self and cls" types on Transport

fixing some easy things from strict pyright run
2021-11-26 16:28:49 +01:00
matejcik
9b9f6859d6 fix(python/build_tx): correct predefined input types 2021-11-09 12:21:09 +01:00
matejcik
428caf3d35 fix(python/build_tx): make build_tx work again after blockbook protection upgrades
Also improve script type selection.
2021-11-04 13:54:43 +01:00
amadejpapez
85ba7c12ba style(all): use f-strings for formatting
[no changelog]
2021-10-13 11:53:17 +02:00
Pavol Rusnak
65cefbc879
docs: remove wallet.trezor.io references 2021-04-16 16:18:48 +02:00
matejcik
2327cab436 feat(python): update build_tx.py to new API 2020-10-30 10:25:51 +01:00
Martin Milata
975f9b335e
build-docker: fix fingerprint calculation for model T production builds (#1261) 2020-09-15 11:28:18 +02:00
mcudev
c63c727df0 [python] build_tx tool: fix amount inaccuracy by parsing with Decimal 2020-09-14 10:07:24 +02:00
Martin Milata
1fc6c80b5d
build-docker.sh: print fw fingerprints after build (#1209) 2020-08-21 14:09:21 +02:00
matejcik
22b167a961 python: update tools/build_tx.py 2020-03-26 11:30:06 +01:00
matejcik
65bb8cdf4e python/trezorctl: only accept json for sign-tx, document the format 2019-11-18 11:50:07 +01:00
Pavol Rusnak
54d348228f
all: rename TREZOR to Trezor where possible 2019-06-17 20:28:29 +02:00
matejcik
37fe33fb4d MONOREPO MERGE python-trezor 2019-04-15 19:15:12 +02:00