Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanjw committed Aug 13, 2018
1 parent 423d1da commit ead5b07
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 28 deletions.
42 changes: 22 additions & 20 deletions tests/core/filtering/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,24 @@ def emitter(web3, Emitter, wait_for_transaction, wait_for_block, address_convers


class LogFunctions:
LogAnonymous=0
LogNoArguments=1
LogSingleArg=2
LogDoubleArg=3
LogTripleArg=4
LogQuadrupleArg=5
LogSingleAnonymous=6
LogSingleWithIndex=7
LogDoubleAnonymous=8
LogDoubleWithIndex=9
LogTripleWithIndex=10
LogQuadrupleWithIndex=11
LogBytes=12
LogString=13
LogDynamicArgs=14
LogListArgs=15
LogAddressIndexed=16
LogAddressNotIndexed=17
LogAnonymous = 0
LogNoArguments = 1
LogSingleArg = 2
LogDoubleArg = 3
LogTripleArg = 4
LogQuadrupleArg = 5
LogSingleAnonymous = 6
LogSingleWithIndex = 7
LogDoubleAnonymous = 8
LogDoubleWithIndex = 9
LogTripleWithIndex = 10
LogQuadrupleWithIndex = 11
LogBytes = 12
LogString = 13
LogDynamicArgs = 14
LogListArgs = 15
LogAddressIndexed = 16
LogAddressNotIndexed = 17


@pytest.fixture()
Expand All @@ -122,8 +122,10 @@ class LogTopics:
LogString = encode_hex(event_signature_to_log_topic("LogString(string)"))
LogDynamicArgs = encode_hex(event_signature_to_log_topic("LogDynamicArgs(string,string)"))
LogListArgs = encode_hex(event_signature_to_log_topic("LogListArgs(bytes2[],bytes2[])"))
LogAddressIndexed = encode_hex(event_signature_to_log_topic("LogAddressIndexed(address,address)"))
LogAddressNotIndexed = encode_hex(event_signature_to_log_topic("LogAddressNotIndexed(address,address)"))
LogAddressIndexed = encode_hex(event_signature_to_log_topic(
"LogAddressIndexed(address,address)"))
LogAddressNotIndexed = encode_hex(event_signature_to_log_topic(
"LogAddressNotIndexed(address,address)"))


@pytest.fixture()
Expand Down
3 changes: 2 additions & 1 deletion tests/core/filtering/test_contract_data_filters.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import pytest

from hypothesis import (
strategies as st,
given,
strategies as st,
)


Expand Down
3 changes: 2 additions & 1 deletion tests/core/filtering/test_contract_topic_filters.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import pytest

from hypothesis import (
strategies as st,
given,
strategies as st,
)


Expand Down
11 changes: 5 additions & 6 deletions tests/core/filtering/test_filters_against_many_blocks.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import pytest
from hypothesis import (
strategies as st,
given,
)
import random

from eth_utils import (
to_tuple,
)
from hypothesis import (
given,
strategies as st,
)


@pytest.fixture
@to_tuple
def deployed_contract_addresses(web3, Emitter):
contract_addresses = []
for i in range(25):
tx_hash = Emitter.constructor().transact()
yield web3.eth.getTransactionReceipt(tx_hash)['contractAddress']
Expand Down Expand Up @@ -157,7 +156,7 @@ def gen_non_matching_transact():
contract_address = deployed_contract_addresses[
random.randint(0, len(deployed_contract_addresses))]
yield web3.eth.contract(
address=contract_address, abi=Emitter.abi).functions.logNoArgs(which=1).transact
address=contract_address, abi=Emitter.abi).functions.logNoArgs(which=1).transact

non_matching_transact = gen_non_matching_transact()

Expand Down

0 comments on commit ead5b07

Please sign in to comment.