Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit e1907e7

Browse files
committed
lint/flake8: fix improper indentation and invalid escape sequences.
SQUASHED: lint/flake8: fix E117 (over-indented). lint/flake8: fix W605 (invalid escape sequence '\_', and the like). This comes from ASCII art in the benchmarking script. There are invalid escape sequences used in the font.
1 parent 36e7322 commit e1907e7

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

eth/db/header.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,23 @@ def _update_header_chain_gaps(
7979
cls,
8080
db: DatabaseAPI,
8181
persisted_header: BlockHeaderAPI,
82-
base_gaps: ChainGaps = None) -> GapInfo:
82+
base_gaps: ChainGaps = None
83+
) -> GapInfo:
8384

84-
# If we make many updates in a row, we can avoid reloading the integrity info by
85-
# continuously caching it and providing it as a parameter to this API
86-
if base_gaps is None:
87-
base_gaps = cls._get_header_chain_gaps(db)
85+
# If we make many updates in a row, we can avoid reloading the integrity info by
86+
# continuously caching it and providing it as a parameter to this API
87+
if base_gaps is None:
88+
base_gaps = cls._get_header_chain_gaps(db)
8889

89-
gap_change, gaps = fill_gap(persisted_header.block_number, base_gaps)
90+
gap_change, gaps = fill_gap(persisted_header.block_number, base_gaps)
9091

91-
if gap_change is not GapChange.NoChange:
92-
db.set(
93-
SchemaV1.make_header_chain_gaps_lookup_key(),
94-
rlp.encode(gaps, sedes=chain_gaps)
95-
)
92+
if gap_change is not GapChange.NoChange:
93+
db.set(
94+
SchemaV1.make_header_chain_gaps_lookup_key(),
95+
rlp.encode(gaps, sedes=chain_gaps)
96+
)
9697

97-
return gap_change, gaps
98+
return gap_change, gaps
9899

99100
#
100101
# Canonical Chain API

scripts/benchmark/run.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,11 @@
5050

5151
HEADER = (
5252
"\n"
53-
"______ _ _ \n"
54-
"| ___ \ | | | | \n"
55-
"| |_/ / ___ _ __ ___| |__ _ __ ___ __ _ _ __| | __ \n"
56-
"| ___ \/ _ \ '_ \ / __| '_ \| '_ ` _ \ / _` | '__| |/ / \n"
57-
"| |_/ / __/ | | | (__| | | | | | | | | (_| | | | < \n"
58-
"\____/ \___|_| |_|\___|_| |_|_| |_| |_|\__,_|_| |_|\_\\\n"
53+
"██████  ███████ ███  ██  ██████ ██  ██ ███  ███  █████  ██████  ██  ██\n"
54+
"██   ██ ██      ████  ██ ██      ██  ██ ████  ████ ██   ██ ██   ██ ██  ██ \n"
55+
"██████  █████  ██ ██  ██ ██  ███████ ██ ████ ██ ███████ ██████  █████  \n"
56+
"██   ██ ██     ██  ██ ██ ██  ██   ██ ██  ██  ██ ██   ██ ██   ██ ██  ██ \n"
57+
"██████  ███████ ██   ████  ██████ ██  ██ ██      ██ ██  ██ ██  ██ ██  ██\n"
5958
)
6059

6160

tests/core/validation/test_eth1_validation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def test_validate_multiple_of(value, multiple_of, is_valid):
271271
)
272272
def test_validate_word(value, is_valid):
273273
if is_valid:
274-
validate_word(value)
274+
validate_word(value)
275275
else:
276276
with pytest.raises(ValidationError):
277277
validate_word(value)
@@ -291,7 +291,7 @@ def test_validate_word(value, is_valid):
291291
)
292292
def test_validate_uint256(value, is_valid):
293293
if is_valid:
294-
validate_uint256(value)
294+
validate_uint256(value)
295295
else:
296296
with pytest.raises(ValidationError):
297297
validate_uint256(value)
@@ -344,7 +344,7 @@ def test_validate_stack_bytes(value, is_valid):
344344
)
345345
def test_validate_lt_secpk1n(value, is_valid):
346346
if is_valid:
347-
validate_lt_secpk1n(value)
347+
validate_lt_secpk1n(value)
348348
else:
349349
with pytest.raises(ValidationError):
350350
validate_lt_secpk1n(value)
@@ -362,7 +362,7 @@ def test_validate_lt_secpk1n(value, is_valid):
362362
)
363363
def test_validate_lt_secpk1n2(value, is_valid):
364364
if is_valid:
365-
validate_lt_secpk1n2(value)
365+
validate_lt_secpk1n2(value)
366366
else:
367367
with pytest.raises(ValidationError):
368368
validate_lt_secpk1n2(value)
@@ -404,7 +404,7 @@ def test_validate_block_number(block_number, is_valid):
404404
)
405405
def test_validate_vm_block_numbers(vm_block_numbers, is_valid):
406406
if is_valid:
407-
validate_vm_block_numbers(vm_block_numbers)
407+
validate_vm_block_numbers(vm_block_numbers)
408408
else:
409409
with pytest.raises(ValidationError):
410410
validate_vm_block_numbers(vm_block_numbers)

0 commit comments

Comments
 (0)