Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
skellet0r committed Jul 18, 2021
1 parent dd30cef commit e85bf9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 7 additions & 7 deletions brownie/network/multicall.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dataclasses import dataclass
from threading import get_ident
from types import FunctionType, TracebackType
from typing import Any, Dict, List, Tuple, Union
from typing import Any, Dict, List, Optional, Tuple, Union

from lazy_object_proxy import Proxy
from wrapt import ObjectProxy
Expand Down Expand Up @@ -55,10 +55,10 @@ def __init__(self) -> None:
ContractCall.__call__.__code__ = self._proxy_call.__code__

def __call__(
self, address: str = None, block_identifier: Union[str, bytes, int] = None
self, address: Optional[str] = None, block_identifier: Union[str, bytes, int, None] = None
) -> "Multicall":
self.address = address
self.block_number = block_identifier
self.address = address # type: ignore
self.block_number = block_identifier # type: ignore
return self

def _flush(self, future_result: Result = None) -> Any:
Expand All @@ -67,7 +67,7 @@ def _flush(self, future_result: Result = None) -> Any:
# or this result has already been retrieved
return future_result
ContractCall.__call__.__code__ = getattr(ContractCall, "__original_call_code")
results = self._contract.tryAggregate(
results = self._contract.tryAggregate( # type: ignore
False,
[_call.calldata for _call in self._pending_calls],
block_identifier=self.block_number,
Expand Down Expand Up @@ -121,8 +121,8 @@ def __enter__(self) -> "Multicall":
self.address = active_network["multicall2"]
elif "cmd" in active_network:
deployment = self.deploy({"from": accounts[0]})
self.address = deployment.address
self.block_number = deployment.tx.block_number
self.address = deployment.address # type: ignore
self.block_number = deployment.tx.block_number # type: ignore

self.block_number = self.block_number or web3.eth.get_block_number()

Expand Down
2 changes: 0 additions & 2 deletions tests/network/test_mulitcall.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import inspect

import pytest
from lazy_object_proxy import Proxy

import brownie
from brownie.exceptions import ContractNotFound


def test_auto_deploy_on_testnet(config, devnetwork):
Expand Down

0 comments on commit e85bf9f

Please sign in to comment.