yaflux._ast._validation — yaflux documentation

Skip to main content
`Ctrl`+`K`

# Source code for yaflux._ast._validation

    from ._assignment import validate_no_self_assignment
    from ._results import validate_step_requirements

    def validate_ast(
        func,
        requires: list[str],
        mutates: list[str],
    ) -> None:
        """Parse a function's AST and perform validation checks."""
        validate_step_requirements(func, requires=requires + mutates)
        validate_no_self_assignment(func, mutates=mutates)