API reference
python:arxjit:arxjit.validate
function validate
validate(extracted: ExtractedSource) -> None
Source: packages/arxjit/src/arxjit/validation.py:687
Declared as: python:arxjit:arxjit.validation.validate
Validate that a function uses only the supported Python subset.
Rejects functions defined in a class body, async definitions and generic (PEP 695) type parameters, checks the argument shape, then walks the body collecting one diagnostic per rejected construct, including free-variable reads (closures and globals). A function with several unsupported constructs is reported in a single UnsupportedSyntaxError carrying all of them, so a user fixes everything in one pass. See _defined_in_class_body for the method forms this cannot detect from source metadata alone.
Parameters
- extracted — Type: ExtractedSource; The result of arxjit.source.extract_source.
Raises
- UnsupportedSyntaxError: "If the function is defined in a class body, is async or generic, has an unsupported argument shape, reads a free variable, or its body uses any construct outside the v1 subset."