PEP8 cleanups

This commit is contained in:
Carl Beekhuizen
2019-05-31 13:20:10 +02:00
parent 92916e5383
commit 28d98b5cf4
3 changed files with 5 additions and 5 deletions

View File

@@ -50,8 +50,7 @@ install_lint:
lint: $(PY_SPEC_ALL_TARGETS)
cd $(PY_SPEC_DIR); . venv/bin/activate; \
flake8 --max-line-length=120 ./eth2spec; \
flake8 --max-line-length=120 --ignore=F401,F403,F405,F821 ./tests;
flake8 --max-line-length=120 ./eth2spec
# "make pyspec" to create the pyspec for all phases.
pyspec: $(PY_SPEC_ALL_TARGETS)

View File

@@ -55,7 +55,7 @@ def test_reveal_from_current_epoch(spec, state):
# @spec_state_test
# def test_reveal_from_past_epoch(state):
# randao_key_reveal = get_valid_early_derived_secret_reveal(spec, state, spec.get_current_epoch(state) - 1)
#
#
# yield from run_early_derived_secret_reveal_processing(spec, state, randao_key_reveal, False)
@@ -99,7 +99,8 @@ def test_double_reveal(spec, state):
intermediate_state,
spec.get_current_epoch(pre_state) + spec.RANDAO_PENALTY_EPOCHS + 1,
)
post_state = dict(run_early_derived_secret_reveal_processing(spec, intermediate_state, randao_key_reveal2, False))['post']
res = dict(run_early_derived_secret_reveal_processing(spec, intermediate_state, randao_key_reveal2, False))
post_state = res['post']
yield 'randao_key_reveal', [randao_key_reveal1, randao_key_reveal2]
yield 'post', post_state

View File

@@ -70,7 +70,7 @@ def prepare_state_and_deposit(spec, state, validator_index, amount, withdrawal_c
withdrawal_credentials = spec.BLS_WITHDRAWAL_PREFIX_BYTE + spec.hash(pubkey)[1:]
deposit, root, deposit_data_leaves = build_deposit(
spec,
spec,
state,
deposit_data_leaves,
pubkey,