Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed May 18, 2023
1 parent f6f2e91 commit a5b1924
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions vyper/semantics/analysis/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ def __init__(
for c in fn_node.get_descendants(vy_ast.Call)
if not (len(c.args) == 1 and isinstance(c.args[0], vy_ast.Dict))
]

node_list.extend(filtered_call_nodes)

for node in node_list:
Expand All @@ -228,18 +227,6 @@ def __init__(
"not allowed to query contract or environment variables in pure functions",
node_list[0],
)

# collect all Call's name nodes except structs
node_list = [
c.func
for c in fn_node.get_descendants(vy_ast.Call)
if not (len(c.args) == 1 and isinstance(c.args[0], vy_ast.Dict))
]
self_references = fn_node.get_descendants(vy_ast.Name, {"id": "self"})
standalone_self = [
n for n in self_references if not isinstance(n.get_ancestor(), vy_ast.Attribute)
]
node_list.extend(standalone_self) # type: ignore
if self.func.mutability is not StateMutability.PAYABLE:
node_list = fn_node.get_descendants(
vy_ast.Attribute, {"value.id": "msg", "attr": "value"}
Expand Down

0 comments on commit a5b1924

Please sign in to comment.