class

Analyzer::Python::CherryPy

Inherits Analyzer::Python::PythonEngine < Analyzer < FileHelper < Reference < Object

Constants

ALIAS_ASSIGN_RE = /^\s*(self\.)?([A-Za-z_]\w*)\s*=\s*([A-Za-z_]\w*)\s*$/
CALL_ASSIGN_RE = /^\s*(self\.)?([A-Za-z_]\w*)\s*=\s*((?:[A-Za-z_]\w*\.)*[A-Za-z_]\w*)\s*\(/

Group 1 (optional self.) tells the class-body walk whether this is a bare class-attribute assignment or a self.-attribute assignment, which matters for scoping nested-router discovery (see walk_class).

CLASS_DEF_RE = /^\s*class\s+([A-Za-z_]\w*)\s*[\(:]/
DEF_RE = /^(?:async\s+)?def\s+([A-Za-z_]\w*)\s*\(/
EXPOSE_DECO_RE = /^@(?:cherrypy\.)?expose\b/
HTTP_VERB_NAMES = Set {"GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "QUERY"}
MAX_DEPTH = 8
NON_BODY_VERBS = Set {"GET", "HEAD", "DELETE", "OPTIONS"}

QUERY (RFC 10008) carries a request body like POST/PUT, so it is excluded from the body-less set even though it's a "read" verb.

ROOT_VAR_ALIAS_ASSIGN_RE = /^\s*([A-Za-z_]\w*)\s*=\s*([A-Za-z_]\w*)\s*$/
ROOT_VAR_CALL_ASSIGN_RE = /^\s*([A-Za-z_]\w*)\s*=\s*((?:[A-Za-z_]\w*\.)*[A-Za-z_]\w*)\s*\(/

Whole-file variant (no self.-scoping needed): used only to resolve the object expression passed to quickstart()/tree.mount(), which is always a plain module-level assignment, never a self. attribute.

Class methods

tech_name
Source

Instance methods

analyze
Source
tech

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.

Source

Nested types