Analyzer::Python::AwsLambdaPowertools
Inherits Analyzer::Python::MountedRouterSupport < Analyzer::Python::PythonEngine < Analyzer < FileHelper < Reference < Object
Constants
ALIAS_RE = /\b([A-Za-z_]\w*)\s*=\s*(?:\w+\.)*current_event\b(?!\s*\.)/
enable_validation=True handlers take request data as arguments:
Annotated[T, Query()] / Header(alias=...) / Body() markers, and
plain scalar arguments that are not path params are query params.
ARG_MARKERS = {"Query" => "query", "Header" => "header", "Cookie" => "cookie", "Body" => "json", "Form" => "form", "File" => "form"}
GETTER_RE = /\.get_(query_string|header)_value\(\s*(?:name\s*=\s*)?['"]([^'"]+)['"]/
current_event.get_query_string_value("q") / get_header_value(name="X").
PATH_PARAM_RE = /<(\w+)>/
REQUEST_ATTRS = {"query_string_parameters" => "query", "multi_value_query_string_parameters" => "query", "json_body" => "json", "headers" => "header"}
SCALAR_ARG_RE = /\A(?:Optional\[)?(?:str|int|float|bool)\b/
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.