Analyzer::Python::Strawberry
Inherits Analyzer::Python::PythonEngine < Analyzer < FileHelper < Reference < Object
Constants
ARGUMENT_NAME = /\bargument\([^)]*\bname\s*=\s*["'](\w+)["']/
FIELD_CALL = /\A(?:[\w.]+\.)?(?:field|mutation|subscription)\z/
FIELD_DECORATOR = /\A(?:[\w.]+\.)?(?:field|mutation|subscription)(?:\(|\z)/
GENERIC = /\A(?:[\w.]+\.)?(\w+)\[(.*)\]\z/m
NOT_A_FIELD = /\b(?:ClassVar|Private|InitVar)\b/
RESERVED_PARAMS = ["self", "cls", "root", "info"] of ::String
self/cls/root/info by name, Info and Parent by annotation.
RESERVED_TYPE = /\b(?:Info|Parent)\b/
TAGGER = "strawberry_analyzer"
TYPE_DECORATOR = /\A(?:[\w.]+\.)?type(?:\(|\z)/
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.