Skip to content

Conversation

@danceratopz
Copy link
Member

@danceratopz danceratopz commented Jan 5, 2026

🗒️ Description

Fix spelling and grammar errors in Python docstrings and comments across src/ethereum/.

This was performed semi-automatically with Claude. I already reviewed each commit in this branch as a separate PR:

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx tox -e static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).

Cute Animal Picture

image

danceratopz and others added 22 commits December 30, 2025 13:22
#2)

- Fix verb form inconsistency in mul() docstring: "Multiply...pushes"
  changed to "Multiplies...pushes" to match neighboring functions
- Fix missing preposition: "instead b'\x00'" -> "instead of b'\x00'"

Co-authored-by: Claude <noreply@anthropic.com>
…ironment, control_flow) (#3)

Fix missing preposition in block.py timestamp docstring:
- "being referred is" -> "being referred to is" (24 files)

Remove extraneous word in environment.py returndatacopy docstring:
- "return data buffer code to memory" -> "return data buffer to memory" (19 files)

Co-authored-by: Claude <noreply@anthropic.com>
…g, memory, stack) (#4)

Fix verb tense consistency and article agreement in docstrings:
- memory.py: "Load word" -> "Loads a word", "Push the size" -> "Pushes the size", "Copy the bytes" -> "Copies the bytes"
- stack.py: "Remove item" -> "Removes an item", "Pushes a N-byte" -> "Pushes an N-byte", "Duplicate the Nth" -> "Duplicates the Nth", "Swap the top" -> "Swaps the top"

Co-authored-by: Claude <noreply@anthropic.com>
Fix singular/plural mismatch in BlockOutput docstring:
- Changed "Key of all the receipts" to "Keys of all the receipts"
  to match the plural field name `receipt_keys` (Tuple type)

Co-authored-by: Claude <noreply@anthropic.com>
Add missing articles in CREATE2 docstring:
- "CREATE opcode" -> "the CREATE opcode"
- "new account" -> "the new account"

Updated 18 files across all forks that have CREATE2 (Constantinople+).

Co-authored-by: Claude <noreply@anthropic.com>
Capitalize "EVM" acronym in docstrings across all 24 runtime.py files.

Co-authored-by: Claude <noreply@anthropic.com>
Fix grammar issues in gas.py across all forks:
- "Calculated" → "Calculates" in calculate_excess_blob_gas docstrings (9 files)
- "value(ETH)" → "value (ETH)" in calculate_message_call_gas docstrings (21 files)

Co-authored-by: Claude <noreply@anthropic.com>
…_init__, mapping) (#9)

Add missing preposition "to" in mapping.py docstrings:
"Mapping of precompiled contracts their implementations."
-> "Mapping of precompiled contracts to their implementations."

Co-authored-by: Claude <noreply@anthropic.com>
* docs: review grammar in precompiled_contracts (ecrecover, sha256, ripemd160, identity)

Reviewed 96 files across all 24 forks. Found no grammar errors requiring
correction. Flagged one style consistency issue for manual review (ECRECOVER
lacks backticks in module docstring while other precompiled contracts use them).

* docs: add backticks to ECRECOVER in module docstrings

Approved from manual review: adds backticks around ECRECOVER in all 24
ecrecover.py files for consistency with SHA256, RIPEMD160, and IDENTITY.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Remove errant period after "and" in modexp.py docstring across all forks.

Co-authored-by: Claude <noreply@anthropic.com>
* docs: review grammar in blake2f.py precompiled contracts

Reviewed 17 blake2f.py files across all forks. No grammar issues found -
the existing docstrings and comments are grammatically correct.

* docs: fix grammar in point_evaluation.py and p256verify.py

Fixed module docstring formatting in all 7 p256verify.py files:
- Removed errant period after "Introduction" heading
- Added missing blank line between heading underline and content
- Added backticks around `P256VERIFY` precompile name

Added backticks around `POINT EVALUATION` in all 9 point_evaluation.py files.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Fix grammar issues in bls12_381_pairing.py across all 8 forks:
- Add missing article: "if sub-group check fails" -> "if the subgroup check fails"
- Fix spelling consistency: "Sub-group" -> "Subgroup" (matches __init__.py)

Co-authored-by: Claude <noreply@anthropic.com>
…py (#14)

Reviewed 96 files in src/ethereum/forks/*/utils/*.py - no grammar
errors found. Documentation is well-written and consistent.

Fixed grammar issues in 48 files (trie.py, state.py) across 24 forks:

- "less that 32 bytes" -> "less than 32 bytes" (trie.py, 24 files)
- "non zero nonce or non empty code" -> "non-zero nonce or
  non-empty code" (state.py, 24 files)
- "needs to set in balance" -> "needs to be set in the balance"
  (state.py, 24 files)
- "needs to be update." -> "needs to be updated." (state.py, 24 files)
- "that need to initialised" -> "that needs to be initialized"
  (state.py, 13 files)

Co-authored-by: Claude <noreply@anthropic.com>
Fix two recurring grammar issues in docstrings:
- blocks.py: "Block number, (height)" -> "Block number (height)" (remove comma)
- bloom.py: "This modules defines" -> "This module defines" (singular)

Changes applied to all 24 fork directories.

Co-authored-by: Claude <noreply@anthropic.com>
…pes.py (#16)

- Fix typo in dao_fork/__init__.py: "July 20, 1026" -> "July 20, 2016"
- Fix typo in bpo5/__init__.py: "BPO3" -> "BPO5"

Co-authored-by: Claude <noreply@anthropic.com>
…legation, dao) (#17)

Fix duplicate word "a a" -> "a" in multiple requests.py docstrings.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
)

* chore(docs): fix spelling and grammar errors in ethereum_spec_tools

- Fix "are the equal" -> "are equal" in lint/__init__.py
- Fix "functions expects the values to hex" -> "function expects the values to be hex" in t8n/t8n_types.py

Round 18 of grammar check (src/ethereum_spec_tools/**/*.py)

* chore(docs): complete grammar check for ethereum_optimized

No grammar issues found in src/ethereum_optimized/**/*.py (4 files reviewed).

Round 19 of grammar check.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Add missing preposition "to" in Block.header docstring across all forks:
"Refer [headers]" → "Refer to [headers]"

🤖 Generated with [Claude Code](https://claude.com/claude-code)
The `set_delegation()` function only takes a single `message` parameter,
but the docstring incorrectly documented an `env` parameter that doesn't
exist in the function signature. This was likely a copy-paste artifact
from when the function signature was refactored.

Affects: prague, osaka, amsterdam, bpo1-5 forks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@danceratopz danceratopz added A-doc Area: documentation A-spec-specs Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`) A-spec-tool Area: Specification Tooling—Tools for the Ethereum specification (eg. `src/ethereum_spec_tools/*`) labels Jan 5, 2026
@danceratopz
Copy link
Member Author

@SamWilsn Is it ok to squash these commits? Indeed, are all these changes ok in a single PR?

@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.33%. Comparing base (d618e52) to head (139efb2).
⚠️ Report is 105 commits behind head on forks/amsterdam.

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #1965   +/-   ##
================================================
  Coverage            86.33%   86.33%           
================================================
  Files                  538      538           
  Lines                34557    34557           
  Branches              3222     3222           
================================================
  Hits                 29835    29835           
  Misses                4148     4148           
  Partials               574      574           
Flag Coverage Δ
unittests 86.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@danceratopz danceratopz changed the title chore(spec-specs): fix typos chore(spec-specs): fix typos in src/ethereum/ Jan 5, 2026
Carsons-Eels pushed a commit to Carsons-Eels/execution-specs that referenced this pull request Jan 6, 2026
* feat(tests): extra clz param for scenarios test case.

* chore(tests): update clz params.
@Carsons-Eels Carsons-Eels self-requested a review January 14, 2026 16:55
@Carsons-Eels
Copy link
Contributor

Carsons-Eels commented Jan 14, 2026

CR Progress:

Copy link
Contributor

@Carsons-Eels Carsons-Eels left a comment

Choose a reason for hiding this comment

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

Just two minor things to look at, will approve as soon as resolved.

🚀🚀🚀

Co-authored-by: Carson <carson@binarycake.ca>
@danceratopz
Copy link
Member Author

Just two minor things to look at, will approve as soon as resolved.

@Carsons-Eels thanks so much for tackling this huge changeset and these fixes!

@Carsons-Eels Carsons-Eels self-requested a review January 16, 2026 15:42
@danceratopz danceratopz merged commit 05117e5 into ethereum:forks/amsterdam Jan 19, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-doc Area: documentation A-spec-specs Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`) A-spec-tool Area: Specification Tooling—Tools for the Ethereum specification (eg. `src/ethereum_spec_tools/*`)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants