From 77f656c80d9995a3b28d1ecd1a12372766822994 Mon Sep 17 00:00:00 2001 From: Aggelos Kyriakoulis Date: Tue, 14 Jan 2025 18:21:38 +0200 Subject: [PATCH] Implemented support for ast.Pass in the interpeter. (#189) --- src/smolagents/local_python_executor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/smolagents/local_python_executor.py b/src/smolagents/local_python_executor.py index 3c545ca..7f1c67e 100644 --- a/src/smolagents/local_python_executor.py +++ b/src/smolagents/local_python_executor.py @@ -1334,6 +1334,8 @@ def evaluate_ast( if expression.value else None ) + elif isinstance(expression, ast.Pass): + return None else: # For now we refuse anything else. Let's add things as we need them. raise InterpreterError(f"{expression.__class__.__name__} is not supported.")