From 79c4af1bdbd504d9767be2f719b07cf67511efb6 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Tue, 8 Jan 2019 14:27:24 -0700 Subject: [PATCH] Improve code style --- web3/contract.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web3/contract.py b/web3/contract.py index 6e68203183..7c39cc9c84 100644 --- a/web3/contract.py +++ b/web3/contract.py @@ -263,10 +263,11 @@ def factory(cls, web3, class_name=None, **kwargs): class_name or cls.__name__, (cls,), kwargs, - normalizers=normalizers) - setattr(contract, 'functions', ContractFunctions(contract.abi, contract.web3)) - setattr(contract, 'events', ContractEvents(contract.abi, contract.web3)) - setattr(contract, 'fallback', Contract.get_fallback_function(contract.abi, contract.web3)) + normalizers=normalizers, + ) + contract.functions = ContractFunctions(contract.abi, contract.web3) + contract.events = ContractEvents(contract.abi, contract.web3) + contract.fallback = Contract.get_fallback_function(contract.abi, contract.web3) return contract