Skip to content

Commit

Permalink
Merge pull request #1737 from eth-brownie/fix-camelCase
Browse files Browse the repository at this point in the history
camelCase -> snake_case fixes
  • Loading branch information
iamdefinitelyahuman authored Feb 4, 2024
2 parents 4d83636 + ebada18 commit fe289c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion brownie/network/middlewares/caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,4 @@ def uninstall(self) -> None:
self.is_killed = True
self.block_cache.clear()
if self.w3.isConnected():
self.w3.eth.uninstallFilter(self.block_filter.filter_id)
self.w3.eth.uninstall_filter(self.block_filter.filter_id)
8 changes: 6 additions & 2 deletions brownie/network/web3.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,15 @@ def disconnect(self) -> None:
self._chain_id = None
self._remove_middlewares()

def isConnected(self) -> bool:
def is_connected(self) -> bool:
if not self.provider:
return False
return super().is_connected()

def isConnected(self) -> bool:
# retained to avoid breaking an interface explicitly defined in brownie
return self.is_connected()

@property
def supports_traces(self) -> bool:
if not self.provider:
Expand All @@ -135,7 +139,7 @@ def supports_traces(self) -> bool:
@property
def _mainnet(self) -> _Web3:
# a web3 instance connected to the mainnet
if self.isConnected() and CONFIG.active_network["id"] == "mainnet":
if self.is_connected() and CONFIG.active_network["id"] == "mainnet":
return self
try:
mainnet = CONFIG.networks["mainnet"]
Expand Down

0 comments on commit fe289c4

Please sign in to comment.