SKILL.md
DJLS Ruff AST
Use this before editing djls-extraction or code that consumes Ruff Python AST nodes.
Known API shapes
- Parse modules with
ruffpythonparser::parsemodule(source)and call.intosyntax()forModModuleAST. - Function defaults are per-parameter. There is no top-level
defaultsfield.
- Use ParameterWithDefault { parameter, default: Option<Box<Expr>> }.
StmtWhile.test,StmtIf.test, and similar fields areBox<Expr>.
- Dereference with &* for pattern matching.
FStringValueuses.iter(), not.parts(), forFStringPartiteration.ExceptHandler::ExceptHandleris irrefutable.
- Use let, not if let.