Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ tests/fixtures
tests/t8n_testdata

fixtures
logs/
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ This specification aims to be:
- Avoid using EIP numbers in identifiers.
- If necessary, there is a custom dictionary `whitelist.txt`.

See [docs/STYLE_GUIDE.md](docs/STYLE_GUIDE.md) for rules not covered by Black (naming, ensure/assert, and typing ignore policy).
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you forget to add this file?

Copy link
Author

Choose a reason for hiding this comment

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

Hi Sam,

Just wanted to follow up on the PR. I've pushed the final changes, which should resolve your review comments.

Here's a quick summary of what's included in the latest commits:

The complete STYLE_GUIDE.md has been added to the docs.

The CONTRIBUTING.md file is now updated to reference the new style guide.

The mypy.ini and pyproject.toml files have been enhanced to enforce the new rules.

The .gitignore file has been updated.

Everything should be up to date on the branch now and ready for your review. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

image

I still don't see a STYLE_GUIDE.md?


### Changes across various Forks

Many contributions require changes across multiple forks, organized under `src/ethereum/*`. When making such changes, please ensure that differences between the forks are minimal and consist only of necessary differences. This will help with getting cleaner [diff outputs](https://ethereum.github.io/execution-specs/diffs/index.html).
Expand Down
2 changes: 2 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ strict_bytes = True
warn_unused_ignores = True
warn_unused_configs = True
warn_redundant_casts = True
show_error_codes = True
enable_error_code = ignore-without-code

ignore_missing_imports = False
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ select = [
"D", # pydocstyle
"C4", # flake8-comprehensions
"ARG", # flake8-unused-arguments
"PGH003", # blanket-type-ignore
]
fixable = [
"E", # pycodestyle errors
Expand Down
8 changes: 6 additions & 2 deletions src/ethereum_spec_tools/docc.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@
from docc.transform import Transform
from fladrif.apply import Apply
from fladrif.treediff import Adapter, Operation, TreeMatcher
from mistletoe import block_token as blocks # type: ignore
from mistletoe import span_token as spans
from mistletoe import ( # type: ignore[import-untyped] # Third-party library without types
block_token as blocks,
)
from mistletoe import (
span_token as spans,
)
from typing_extensions import assert_never, override

from .forks import Hardfork
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum_spec_tools/forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def load(cls: Type[H], config_dict: Dict["ForkCriteria", str]) -> List[H]:

for criteria, name in config:
mod = importlib.import_module("ethereum." + name)
mod.FORK_CRITERIA = criteria # type: ignore
mod.FORK_CRITERIA = criteria # type: ignore[attr-defined] # Dynamic module attribute assignment
forks.append(cls(mod))

return forks
Expand Down