Analyzer::Python::Starlette
Inherits Analyzer::Python::PythonEngine < Analyzer < FileHelper < Reference < Object
Constants
Hoisted out of the analyze loops: an interpolated regex literal
recompiles (PCRE2 JIT) on every evaluation, and these interpolate
only constants. The .to_s expansion is byte-identical to the
previous inline form, so matching behaviour is unchanged.
Mount('/prefix', routes=[...]) — only the prefix literal is needed; the routes list is scanned via the ongoing line loop while the mount is on the paren stack.
Path param in a route pattern: {name} or {name:type}. Starlette uses the :type suffix as a converter hint (int, str, float, uuid, path); it is stripped before the param is exposed as a path param.
Route('/path', handler, methods=[...]) — captures path, and the tail after the path literal so we can inspect methods= and the handler reference. The tail stops at the closing paren on the same line to keep the match cheap; multi-line Route() calls are still covered for the common (path, handler, methods) shape.
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.