Skip to content

Commit

Permalink
Remove deprecated ast use
Browse files Browse the repository at this point in the history
These raise DeprecationWarnings on 3.13, and will raise errors with 3.15
  • Loading branch information
mstimberg committed Sep 12, 2024
1 parent b450dd7 commit 7f6b0e5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions brian2/parsing/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ def visit_Call(self, node):
func=ast.Name(id=node.func.id, ctx=ast.Load()),
args=args,
keywords=[],
starargs=None,
kwargs=None,
)


Expand Down
3 changes: 1 addition & 2 deletions brian2/parsing/rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ def render_Call(self, node):
raise ValueError("Keyword arguments not supported")
else:
if node.func.id in self.auto_vectorise:
vectorisation_idx = ast.Name()
vectorisation_idx.id = "_vectorisation_idx"
vectorisation_idx = ast.Name("_vectorisation_idx")
args = node.args + [vectorisation_idx]
else:
args = node.args
Expand Down

0 comments on commit 7f6b0e5

Please sign in to comment.