diff --git a/zt_backend/runner/code_cell_parser.py b/zt_backend/runner/code_cell_parser.py index 4754d0db..64c474cf 100644 --- a/zt_backend/runner/code_cell_parser.py +++ b/zt_backend/runner/code_cell_parser.py @@ -47,7 +47,7 @@ def get_defined_names(module) -> List[str]: for func in module.nodes_of_class(astroid.FunctionDef) for arg in func.args.args ] - return list(set(defined_names) - set(func_def_names)) + return list((set(defined_names) & set(func_def_names)) | (set(defined_names) - set(func_def_names))) def get_loaded_modules(module, all_imports) -> List[str]: