Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: coverage #275

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions boa/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def dynamic_context(self, frame):


# helper function. null returns get optimized directly into a jump
# to function cleanup which maps to the parnet FunctionDef ast.
# to function cleanup which maps to the parent FunctionDef ast.
def _is_null_return(ast_node):
match ast_node:
case vy_ast.Return(value=None):
Expand All @@ -113,7 +113,7 @@ def __init__(self, filename, env=None):

@cached_property
def _compiler_data(self):
return boa.interpret.compiler_data(self.source(), self.filename)
return boa.interpret.compiler_data(self.source(), self.filename, self.filename)

def arcs(self):
ret = set()
Expand Down
2 changes: 1 addition & 1 deletion boa/interpret.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def get_compiler_data():
_ = ret.bytecode, ret.bytecode_runtime
return ret

assert isinstance(deployer, type)
assert isinstance(deployer, type) or deployer is None
deployer_id = repr(deployer) # a unique str identifying the deployer class
cache_key = str((contract_name, fingerprint, kwargs, deployer_id))
return _disk_cache.caching_lookup(cache_key, get_compiler_data)
Expand Down
Loading