class
Analyzer::Python::Tornado
Defined in:
analyzer/analyzers/python/tornado.crConstant Summary
-
APP_INSTANCE_RE =
/(#{PYTHON_VAR_NAME_REGEX})(?::#{PYTHON_VAR_NAME_REGEX})?=(?:tornado\.web\.)?Application\(/ -
Per-line matchers that interpolate only constants — hoisted so the analyze loop doesn't recompile identical PCRE2 patterns on every source line. The
.to_sexpansion is byte-identical to the inline literals, so matching behaviour is unchanged. -
CLASS_DEF_REGEX =
/^class\s+([a-zA-Z_][a-zA-Z0-9_]*)\s*[\(:]/ -
HANDLER_LIST_RE =
/^(#{PYTHON_VAR_NAME_REGEX})(?::#{DOT_NATION})?=\[/ -
REQUEST_PARAM_FIELDS =
{"arguments" => {["GET"], "query"}, "body_arguments" => {["POST", "PUT", "PATCH", "DELETE"], "form"}, "files" => {["POST", "PUT", "PATCH", "DELETE"], "form"}, "body" => {["POST", "PUT", "PATCH", "DELETE"], "body"}, "headers" => {nil, "header"}, "cookies" => {nil, "cookie"}} -
Reference: https://tornadoweb.org/en/stable/web.html Reference: https://tornadoweb.org/en/stable/httputil.html#tornado.httputil.HTTPServerRequest
-
REQUEST_PARAM_TYPES =
{"query" => nil, "form" => ["POST", "PUT", "PATCH", "DELETE"], "body" => ["POST", "PUT", "PATCH", "DELETE"], "cookie" => nil, "header" => nil}