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

Improve combomethod type hints #264

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

darwintree
Copy link

What was wrong?

Related to Issue #236
Closes #236

How was it fixed?

This commit adopts the solution from here. It uses ParamSpec and Concatenate added in python3.10. And in order to use this feature minor to 3.10, typing-extensions dependency is added in setup.py

Todo:

  • Clean up commit history

  • Add or update documentation related to these changes

  • Add entry to the release notes

Cute Animal Picture

image

slundqui added a commit to delvtech/pypechain that referenced this pull request Oct 7, 2024
…sion bump to v0.0.41 (#133)

Major updates:
- Adding `process_receipts_typed` that returns a dataclass typed event
when given a transaction receipt.
- Adding `combomethod_typed` that allows for combomethods that preserve
types, and propagating the change throughout.
- Similar to solution in eth-utils here:
ethereum/eth-utils#264
- Renaming `get_typed_logs` to `get_logs_typed` for consistency.
- Adding `BaseEventArgs` and frozen dataclass attribute for arg
subclassing. This also ensures the `arg` field exists in all event
types.
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.

Provide better type hints for combomethod
1 participant