From 28d98b5cf47ce2b85a618917a5a02b36b603ba93 Mon Sep 17 00:00:00 2001 From: Carl Beekhuizen Date: Fri, 31 May 2019 13:20:10 +0200 Subject: [PATCH] PEP8 cleanups --- Makefile | 3 +-- .../test_process_early_derived_secret_reveal.py | 5 +++-- test_libs/pyspec/eth2spec/test/helpers/deposits.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index af71f44fb..33eb3ecec 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/test_libs/pyspec/eth2spec/test/block_processing/test_process_early_derived_secret_reveal.py b/test_libs/pyspec/eth2spec/test/block_processing/test_process_early_derived_secret_reveal.py index 4b4608d4d..4b7de56c8 100644 --- a/test_libs/pyspec/eth2spec/test/block_processing/test_process_early_derived_secret_reveal.py +++ b/test_libs/pyspec/eth2spec/test/block_processing/test_process_early_derived_secret_reveal.py @@ -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 diff --git a/test_libs/pyspec/eth2spec/test/helpers/deposits.py b/test_libs/pyspec/eth2spec/test/helpers/deposits.py index 9711f8b0f..6d9b6e118 100644 --- a/test_libs/pyspec/eth2spec/test/helpers/deposits.py +++ b/test_libs/pyspec/eth2spec/test/helpers/deposits.py @@ -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,