You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running version 0.2.1. It seems that paramit can't ignore operations done to an input variable. E.g., run this:
import os
a = 'precomputed.npy'
b = 20
if not os.path.exists(a):
a = f'precomputed_{b}' + '.npy'
triggers this:
Traceback (most recent call last):
File "/home/envs/testenv/bin/paramit", line 8, in <module>
sys.exit(main())
File "/home/envs/testenv/lib/python3.9/site-packages/paramit/cli/__init__.py", line 695, in main
modified_tree = set_global_variables_from_config(
File "/home/envs/testenv/lib/python3.9/site-packages/paramit/cli/__init__.py", line 289, in set_global_variables_from_config
modified_tree = wrapper.visit(transformer)
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/metadata/wrapper.py", line 204, in visit
return self.module.visit(visitor)
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/module.py", line 89, in visit
result = super(Module, self).visit(visitor)
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/base.py", line 227, in visit
_CSTNodeSelfT, self._visit_and_replace_children(visitor)
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/module.py", line 74, in _visit_and_replace_children
body=visit_body_sequence(self, "body", self.body, visitor),
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/internal.py", line 227, in visit_body_sequence
return tuple(visit_body_iterable(parent, fieldname, children, visitor))
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/internal.py", line 193, in visit_body_iterable
new_child = child.visit(visitor)
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/base.py", line 227, in visit
_CSTNodeSelfT, self._visit_and_replace_children(visitor)
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/statement.py", line 616, in _visit_and_replace_children
body=visit_required(self, "body", self.body, visitor),
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/internal.py", line 81, in visit_required
result = node.visit(visitor)
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/base.py", line 227, in visit
_CSTNodeSelfT, self._visit_and_replace_children(visitor)
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/statement.py", line 698, in _visit_and_replace_children
body=visit_body_sequence(self, "body", self.body, visitor),
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/internal.py", line 227, in visit_body_sequence
return tuple(visit_body_iterable(parent, fieldname, children, visitor))
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/internal.py", line 193, in visit_body_iterable
new_child = child.visit(visitor)
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/base.py", line 227, in visit
_CSTNodeSelfT, self._visit_and_replace_children(visitor)
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/statement.py", line 443, in _visit_and_replace_children
body=visit_sequence(self, "body", self.body, visitor),
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/internal.py", line 177, in visit_sequence
return tuple(visit_iterable(parent, fieldname, children, visitor))
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/internal.py", line 159, in visit_iterable
new_child = child.visit(visitor)
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_nodes/base.py", line 236, in visit
leave_result = visitor.on_leave(self, with_updated_children)
File "/home/envs/testenv/lib/python3.9/site-packages/libcst/_visitors.py", line 71, in on_leave
updated_node = leave_func(original_node, updated_node)
File "/home/envs/testenv/lib/python3.9/site-packages/paramit/cli/__init__.py", line 197, in leave_Assign
raise ValueError(
ValueError: Unsupported type <class 'str'>, <class 'libcst._nodes.expression.BinaryOperation'>
The text was updated successfully, but these errors were encountered:
I'm running version
0.2.1
. It seems that paramit can't ignore operations done to an input variable. E.g., run this:triggers this:
The text was updated successfully, but these errors were encountered: