Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type hints to secp256k1_main.py and secp256k1_transaction.py #1595

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

kristapsk
Copy link
Member

It's sometimes especially time consuming with this part of JM codebase for me to figure out types for function arguments and return values, usually I end up looking at python-bitcointx code.

Changed return type of get_equal_outs() from Union[bool, List[CTxOut]] to Optional[List[CTxOut]], only caller (scripts/snicker/snicker-recovery.py) already handled this.

@kristapsk kristapsk force-pushed the secp256k1-type-hints branch 4 times, most recently from 9e340d9 to 20d7860 Compare November 13, 2023 10:52
@kristapsk
Copy link
Member Author

Rebased

Copy link
Contributor

@roshii roshii left a comment

Choose a reason for hiding this comment

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

I did notice a mismatched with one return type, also suggesting a notation that feels easier to understand.

src/jmbitcoin/secp256k1_main.py Outdated Show resolved Hide resolved
src/jmbitcoin/secp256k1_transaction.py Outdated Show resolved Hide resolved
Co-authored-by: roshii <[email protected]>
@kristapsk kristapsk force-pushed the secp256k1-type-hints branch from 20d7860 to 7ebbacf Compare December 5, 2023 20:48
@kristapsk
Copy link
Member Author

Addressed review comments.

Copy link
Contributor

@roshii roshii left a comment

Choose a reason for hiding this comment

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

utACK 7ebbacf

@kristapsk kristapsk merged commit 5c1e1c1 into JoinMarket-Org:master Dec 6, 2023
8 checks passed
@kristapsk kristapsk deleted the secp256k1-type-hints branch December 6, 2023 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants