Skip to content

Commit

Permalink
chore: fix anomalous typing concern (#2070)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed May 7, 2024
1 parent 4c346d3 commit 42cf4bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ape/managers/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,12 +1127,12 @@ def instance_at(
isinstance(abi, str) and "{" not in abi and Path(abi).is_file()
):
# Handle both absolute and relative paths
abi = Path(abi)
if not abi.is_absolute():
abi = self.project_manager.path / abi
abi_path = Path(abi)
if not abi_path.is_absolute():
abi_path = self.project_manager.path / abi

try:
abi = json.loads(abi.read_text())
abi = json.loads(abi_path.read_text())
except Exception as err:
if contract_type:
# If a default contract type was provided, don't error and use it.
Expand Down

0 comments on commit 42cf4bc

Please sign in to comment.