Analyzer::Python::Robyn
Inherits Analyzer::Python::PythonEngine < Analyzer < FileHelper < Reference < Object
Constants
HTTP_METHOD_DECORATORS = ["get", "post", "put", "patch", "delete", "head", "options", "trace"] of ::String
INCLUDE_ROUTER_RE = /\b(#{PYTHON_VAR_NAME_REGEX})\.include_router\s*\(\s*(#{PYTHON_VAR_NAME_REGEX})/
ROBYN_INSTANCE_RE = /^\s*(#{PYTHON_VAR_NAME_REGEX})\s*=\s*(?:robyn\.)?Robyn\s*\(/
Hoisted out of the per-line 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.
SUBROUTER_RE = /^\s*(#{PYTHON_VAR_NAME_REGEX})\s*=\s*(?:robyn\.)?SubRouter\s*\((.*)/m
WEBSOCKET_ATTRIBUTES = {"websocket" => "GET"}
Class methods
tech_name
SourceInstance methods
analyze
Sourcetech
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.