class
Analyzer::Python::Robyn
Defined in:
analyzer/analyzers/python/robyn.crConstant Summary
-
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_sexpansion 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"}