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

Consistent type hints in fork_types.py #898

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

Conversation

DistributedDoge
Copy link

What was wrong?

Some type annotations in fork_types.py for each fork use bytes type, and some use Bytes alias imported from ..base_types.

fork_types.py

class Transaction:
    ...
    data: Bytes

class Account:
    ...
    code: bytes

class Log:
    ...
    data: bytes

Issue #752 suggests that spec would be more consistent if Bytes alias was applied everywhere to match surrounding code.

This change should not result in any functional difference as Bytes is alias for bytes.

How was it fixed?

For every Log.data and Account.code in src/ethereum/$fork_name/fork_types.py replaced type annotation like so: bytes => Bytes.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

Copy link
Collaborator

@SamWilsn SamWilsn left a comment

Choose a reason for hiding this comment

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

This looks good! Would you mind rebasing it on the current master?

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