Skip to main content

validate_python_syntax

Function validate_python_syntax 

Source
pub async fn validate_python_syntax(
    backend: &dyn ExecutionBackend,
    path: &Path,
) -> Option<String>
Expand description

Validate Python syntax by running py_compile. Returns None if valid, or the error message if there’s a SyntaxError. Runs with a 5-second timeout.