Skip to content

Commit 08804ce

Browse files
committed
fix docstring lengths
1 parent df81019 commit 08804ce

File tree

281 files changed

+4080
-2928
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

281 files changed

+4080
-2928
lines changed

.github/scripts/generate_eip_report.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
"""Generate a markdown report of outdated EIP references from the EIP version checker output."""
1+
"""
2+
Generate a markdown report of outdated EIP references from the EIP version
3+
checker output.
4+
"""
25

36
import os
47
import re
@@ -8,10 +11,13 @@
811

912
# Report template using textwrap.dedent for clean multiline strings
1013
REPORT_TEMPLATE = Template(
11-
textwrap.dedent("""\
14+
textwrap.dedent(
15+
"""\
1216
# EIP Version Check Report
1317
14-
This automated check has detected that some EIP references in test files are outdated. This means that the EIPs have been updated in the [ethereum/EIPs](https://github.com/ethereum/EIPs) repository since our tests were last updated.
18+
This automated check has detected that some EIP references in test files are outdated.
19+
This means that the EIPs have been updated in the
20+
[ethereum/EIPs](https://github.com/ethereum/EIPs) repository since our tests were last updated.
1521
1622
## Outdated EIP References
1723
@@ -42,7 +48,8 @@
4248
## Workflow Information
4349
4450
For more details, see the [workflow run](https://github.com/ethereum/execution-spec-tests/actions/runs/$run_id).
45-
""") # noqa: E501
51+
"""
52+
) # noqa: E501
4653
)
4754

4855

src/cli/compare_fixtures.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""
22
Compare two fixture folders and remove duplicates based on fixture hashes.
33
4-
This tool reads the .meta/index.json files from two fixture directories and identifies
5-
fixtures with identical hashes on a test case basis, then removes the duplicates from
6-
both of the folders. Used within the coverage workflow.
4+
This tool reads the .meta/index.json files from two fixture directories and
5+
identifies fixtures with identical hashes on a test case basis, then removes
6+
the duplicates from both of the folders. Used within the coverage workflow.
77
"""
88

99
import json
@@ -95,8 +95,8 @@ def batch_remove_fixtures_from_files(removals_by_file):
9595

9696
def rewrite_index(folder: Path, index: IndexFile, dry_run: bool):
9797
"""
98-
Rewrite the index to the correct index file, or if the test count was reduced to zero,
99-
the entire directory is deleted.
98+
Rewrite the index to the correct index file, or if the test count was
99+
reduced to zero, the entire directory is deleted.
100100
"""
101101
if len(index.test_cases) > 0:
102102
# Just rewrite the index

src/cli/eest/cli.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""
22
`eest` is a CLI tool that helps with routine tasks.
3+
34
Invoke using `uv run eest`.
45
"""
56

@@ -15,16 +16,9 @@ def eest():
1516
pass
1617

1718

18-
"""
19-
################################
20-
|| ||
21-
|| Command Registration ||
22-
|| ||
23-
################################
24-
25-
Register nested commands here. For more information, see Click documentation:
26-
https://click.palletsprojects.com/en/8.0.x/commands/#nested-handling-and-contexts
27-
"""
19+
# Register nested commands here. For more information, see Click documentation:
20+
# https://click.palletsprojects.com/en/8.0.x/commands/#nested-handling-and-contexts
21+
2822
eest.add_command(make)
2923
eest.add_command(clean)
3024
eest.add_command(info)

src/cli/eest/commands/clean.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
def clean(all_files: bool, dry_run: bool, verbose: bool):
2020
"""
2121
Remove all generated files and directories from the repository.
22-
If `--all` is specified, the virtual environment and .tox directory will also be removed.
22+
23+
If `--all` is specified, the virtual environment and .tox directory will also
24+
be removed.
2325
2426
Args:
2527
all_files (bool): Remove the virtual environment and .tox directory as well.

src/cli/eest/make/cli.py

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
"""
2-
The `make` CLI streamlines the process of scaffolding tasks, such as generating new test files,
3-
enabling developers to concentrate on the core aspects of specification testing.
4-
5-
6-
The module calls the appropriate function for the subcommand. If an invalid subcommand
7-
is chosen, it throws an error and shows a list of valid subcommands. If no subcommand
8-
is present, it shows a list of valid subcommands to choose from.
2+
The `make` CLI streamlines the process of scaffolding tasks, such as
3+
generating new test files, enabling developers to concentrate on the core
4+
aspects of specification testing.
5+
6+
The module calls the appropriate function for the subcommand. If an invalid
7+
subcommand is chosen, it throws an error and shows a list of valid subcommands.
8+
If no subcommand is present, it shows a list of valid subcommands to choose
9+
from.
910
"""
1011

1112
import click
@@ -19,15 +20,8 @@ def make():
1920
pass
2021

2122

22-
"""
23-
################################
24-
|| ||
25-
|| Command Registration ||
26-
|| ||
27-
################################
28-
29-
Register nested commands here. For more information, see Click documentation:
30-
https://click.palletsprojects.com/en/8.0.x/commands/#nested-handling-and-contexts
31-
"""
23+
# Register nested commands here. For more information, see Click documentation:
24+
# https://click.palletsprojects.com/en/8.0.x/commands/#nested-handling-and-contexts
25+
3226
make.add_command(test)
3327
make.add_command(create_default_env)

src/cli/eest/make/commands/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""
2-
Holds subcommands for the make command. New subcommands must be created as
3-
modules and exported from this package, then registered under the make command in
4-
`cli.py`.
2+
Holds subcommands for the make command.
3+
4+
New subcommands must be created as modules and exported from this package, then
5+
registered under the make command in `cli.py`.
56
"""
67

78
from .env import create_default_env

src/cli/eest/make/commands/test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"""
22
Provides a CLI command to scaffold a test file.
33
4-
The `test` command guides the user through a series of prompts to generate a test file
5-
based on the selected test type, fork, EIP number, and EIP name. The generated test file
6-
is saved in the appropriate directory with a rendered template using Jinja2.
4+
The `test` command guides the user through a series of prompts to generate a
5+
test file based on the selected test type, fork, EIP number, and EIP name. The
6+
generated test file is saved in the appropriate directory with a rendered
7+
template using Jinja2.
78
"""
89

910
import os

src/cli/eest/quotes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,8 @@ def box_quote(quote):
5151

5252

5353
def get_quote():
54-
"""Return random inspirational quote related to system design formatted in a box."""
54+
"""
55+
Return random inspirational quote related to system design formatted in a
56+
box.
57+
"""
5558
return box_quote(random.choice(make_something_great))

src/cli/eofwrap.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
Generate a JSON blockchain test from an existing JSON blockchain test by wrapping its pre-state
3-
code in EOF wherever possible.
2+
Generate a JSON blockchain test from an existing JSON blockchain test by
3+
wrapping its pre-state code in EOF wherever possible.
44
55
Example Usage:
66
@@ -44,8 +44,8 @@
4444
@click.option("--traces", is_flag=True, type=bool)
4545
def eof_wrap(input_path: str, output_dir: str, traces: bool):
4646
"""
47-
Wrap JSON blockchain test file(s) found at `input_path` and
48-
outputs them to the `output_dir`.
47+
Wrap JSON blockchain test file(s) found at `input_path` and outputs them to
48+
the `output_dir`.
4949
"""
5050
eof_wrapper = EofWrapper()
5151

@@ -168,8 +168,10 @@ def __init__(self):
168168

169169
def wrap_file(self, in_path: str, out_path: str, traces: bool):
170170
"""
171-
Wrap code from a blockchain test JSON file from `in_path` into EOF containers,
172-
wherever possible. If not possible - skips and tracks that in metrics. Possible means
171+
Wrap code from a blockchain test JSON file from `in_path` into EOF
172+
containers, wherever possible.
173+
174+
If not possible - skips and tracks that in metrics. Possible means
173175
at least one account's code can be wrapped in a valid EOF container and the assertions
174176
on post state are satisfied.
175177
"""
@@ -336,8 +338,8 @@ def _validate_eof(self, container: Container, metrics: bool = True) -> bool:
336338
@no_type_check
337339
def wrap_code(account_code: Bytes) -> Container:
338340
"""
339-
Wrap `account_code` into a simplest EOF container, applying some simple heuristics in
340-
order to obtain a valid code section termination.
341+
Wrap `account_code` into a simplest EOF container, applying some simple
342+
heuristics in order to obtain a valid code section termination.
341343
"""
342344
assert len(account_code) > 0
343345

src/cli/evm_bytes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ def hex_string(hex_string: str, assembly: bool):
206206
@click.argument("binary_file", type=click.File("rb"))
207207
def binary_file(binary_file, assembly: bool):
208208
"""
209-
Convert the BINARY_FILE containing EVM bytes to Python Opcodes or assembly.
209+
Convert the BINARY_FILE containing EVM bytes to Python Opcodes or
210+
assembly.
210211
211212
BINARY_FILE is a binary file containing EVM bytes, use `-` to read from stdin.
212213

0 commit comments

Comments
 (0)