Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberthirst committed Nov 13, 2024
1 parent 73aeacc commit 4e282b4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions tests/functional/codegen/modules/test_interface_imports.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import pytest


def test_import_interface_types(make_input_bundle, get_contract):
ifaces = """
interface IFoo:
Expand Down
6 changes: 3 additions & 3 deletions tests/functional/codegen/test_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ def foo():
i: lib1.__interface__
@external
@external
def bar() -> lib1.__interface__:
self.i = lib1.__at__(self)
return self.i
Expand Down Expand Up @@ -845,13 +845,13 @@ def bar(a: address):


def test_intrinsic_interface_defaults(env, make_input_bundle, get_contract):
lib1 = f"""
lib1 = """
@external
@payable
def foo(i: uint256=1) -> uint256:
return i
"""
main = f"""
main = """
import lib1
exports: lib1.__interface__
Expand Down
1 change: 1 addition & 0 deletions tests/functional/syntax/modules/test_deploy_visibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def foo():

assert e.value.message == "Cannot call an @deploy function from an @external function!"


@pytest.mark.parametrize("interface_syntax", ["__interface__", "__at__"])
def test_module_interface_init(make_input_bundle, tmp_path, interface_syntax):
lib1 = """
Expand Down
1 change: 1 addition & 0 deletions tests/functional/syntax/test_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,5 +617,6 @@ def bar():
"""
input_bundle = make_input_bundle({"lib1.vy": lib1})

# TODO make the exception more precise once fixed
with pytest.raises(Exception):
compiler.compile_code(main, input_bundle=input_bundle)

0 comments on commit 4e282b4

Please sign in to comment.