Analyzer::Python::Quart
Inherits Analyzer::Python::FlaskFamily < Analyzer::Python::PythonEngine < Analyzer < FileHelper < Reference < Object
Quart is an ASGI re-implementation of Flask's API. Decorator, Blueprint, and request-object shapes mirror Flask 1:1, so this analyzer leans on the same tree-sitter helpers as the Flask one and adds two Quart-specific pieces:
@app.websocket("/ws")— surfaced asGET+protocol = "ws"so the existing endpoint pipeline carries it through unchangedawait request.get_json()/request.jsonbody extraction — the same patterns Flask uses; nothing extra is needed because parameter extraction reads the function body line-by-line and theawaitprefix doesn't change the access shape.
Constants
Per-line route-discovery patterns. These interpolate only the
PYTHON_VAR_NAME_REGEX/DOT_NATION constants, so an inline literal
inside the per-line analyze loop recompiled an identical PCRE2
pattern on every source line of every file. Compile once here; the
.to_s expansion of the interpolated constants is byte-identical
to the previous inline form, so matching behaviour is unchanged.
Constant-only interpolation (DOT_NATION) — hoisted so the per-call sites don't recompile them.
@app.websocket("/ws") is the only attribute outside the
standard HTTP-method set that the tree-sitter extractor needs
to surface here. The synthesised method stays GET so the
downstream filter logic (which keys off HTTP methods) keeps
working; the analyzer rewrites protocol to "ws" later.
Class methods
Instance methods
Instance-side view of the same declaration. The per-file rescues live on
this base class, which has no way to name the analyzer that is running
inside them, so a skipped file could not be attributed to a tech.
Deriving it from analyzer_for keeps the name written exactly once.