Update main_app.py
Browse files- main_app.py +1 -2
main_app.py
CHANGED
@@ -419,13 +419,12 @@ def _(function_editor, mo, os):
|
|
419 |
if function_editor.value:
|
420 |
# Get the edited code from the function editor
|
421 |
code = function_editor.value['editor']
|
422 |
-
|
423 |
# Extract function name using AST without executing the code
|
424 |
|
425 |
try:
|
426 |
# Parse the code to find function definitions
|
427 |
parsed_ast = ast.parse(code)
|
428 |
-
function_name = None
|
429 |
for node in parsed_ast.body:
|
430 |
if isinstance(node, ast.FunctionDef):
|
431 |
function_name = node.name
|
|
|
419 |
if function_editor.value:
|
420 |
# Get the edited code from the function editor
|
421 |
code = function_editor.value['editor']
|
422 |
+
function_name = None
|
423 |
# Extract function name using AST without executing the code
|
424 |
|
425 |
try:
|
426 |
# Parse the code to find function definitions
|
427 |
parsed_ast = ast.parse(code)
|
|
|
428 |
for node in parsed_ast.body:
|
429 |
if isinstance(node, ast.FunctionDef):
|
430 |
function_name = node.name
|