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
When processing a class with inheritance in noworkflow, the bases and keywords are not correctly captured, resulting in a RuntimeError for super(). ClassDef (class_def) without base classes are working, as do the name, body, and decorator lists of the class. However, the bases and keyword arguments are not captured correctly.
classBaseClass:
def__init__(self, base_value):
self.base_value=base_valuedefbase_method(self):
return"This is a method in the base class"defclass_decorator(cls):
cls.decorated=Truereturnclsdefmethod_decorator(func):
defwrapper(*args, **kwargs):
print("Method is being called")
returnfunc(*args, **kwargs)
returnwrapper@class_decoratorclassDerivedClass(BaseClass):
class_variable="I am a class variable"def__init__(self, base_value, derived_value):
super().__init__(base_value)
self.derived_value=derived_value@method_decoratordefdecorated_method(self):
return"This method is decorated"derived_instance=DerivedClass(10, 20)
Error Output:
[now] RuntimeError('super(): class cell not found')
the execution finished with an uncaught exception. Traceback (most recent call last):
File "...\noworkflow\capture\noworkflow\now\collection\prov_execution\execution.py", line 64, in collect_provenance
exec(compiled, metascript.namespace) # pylint: disable=exec-used
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\noworkflow\demo_1\class.py", line 35, in
derived_instance = DerivedClass(10, 20)
^^^^^^^^^^^^^^^^^^^^
File "...\noworkflow\capture\noworkflow\now\collection\prov_execution\collector.py", line 1207, in _call
result = future.func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\noworkflow\capture\noworkflow\now\collection\prov_execution\collector.py", line 1351, in new_function_def
result = _call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "...\noworkflow\capture\noworkflow\now\collection\prov_execution\collector.py", line 1207, in _call
result = future.func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\noworkflow\capture\noworkflow\now\collection\prov_execution\collector.py", line 1370, in new_function_def
result = function_def(
^^^^^^^^^^^^^
File "...\noworkflow\demo_1\class.py", line 27, in init
super().init(base_value)
^^^^^^^
File "...\noworkflow\capture\noworkflow\now\collection\prov_execution\collector.py", line 1207, in _call
result = future.func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: super(): class cell not found
The text was updated successfully, but these errors were encountered:
When processing a class with inheritance in noworkflow, the bases and keywords are not correctly captured, resulting in a RuntimeError for super(). ClassDef (
class_def
) without base classes are working, as do the name, body, and decorator lists of the class. However, the bases and keyword arguments are not captured correctly.Error Output:
The text was updated successfully, but these errors were encountered: