Skip to content

Commit

Permalink
fix: logical mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Jul 23, 2024
1 parent ae3c9ad commit c7dea80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ape_vyper/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def _get_imports(
prefix = prefix[1:]

is_relative: Optional[bool] = None
if dots == "":
if dots != "":
is_relative = True
# else: we are unsure since dots are not required.

Expand Down
2 changes: 1 addition & 1 deletion tests/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def test_get_imports(compiler, project):

actual_iface_use = actual[use_iface_key]
for expected in (local_import, local_from_import, dependency_import, local_nested_import):
assert any(k for k in actual_iface_use if expected in k)
assert any(k for k in actual_iface_use if expected in k), f"{expected} not found"

assert actual[use_iface2_key][0].endswith(local_import)

Expand Down

0 comments on commit c7dea80

Please sign in to comment.