module documentation
Undocumented
Function | add |
Adds a new attribute to a class definition. This currently only generates the symbol table entry and no corresponding AssignmentStatement |
Function | add |
Adds a new method to a class. Deprecated, use add_method_to_class() instead. |
Function | add |
Adds a new method to a class definition. |
Function | deserialize |
Undocumented |
Function | _get |
Return the expression for the specific argument. |
Function | _get |
Return the boolean value for an argument to a call or the default if it's not found. |
Function | _get |
Return the type of the callee, regardless of its syntatic form. |
Function | _get |
Return the bool argument for the decorator. |
def add_attribute_to_class(api:
SemanticAnalyzerPluginInterface
, cls: ClassDef
, name: str
, typ: Type
, final: bool
= False, no_serialize: bool
= False, override_allow_incompatible: bool
= False, fullname: str|None
= None, is_classvar: bool
= False):
(source)
¶
Adds a new attribute to a class definition. This currently only generates the symbol table entry and no corresponding AssignmentStatement
def add_method(ctx:
ClassDefContext
, name: str
, args: list[ Argument]
, return_type: Type
, self_type: Type|None
= None, tvar_def: TypeVarType|None
= None, is_classmethod: bool
= False, is_staticmethod: bool
= False):
(source)
¶
Adds a new method to a class. Deprecated, use add_method_to_class() instead.
def add_method_to_class(api:
SemanticAnalyzerPluginInterface|CheckerPluginInterface
, cls: ClassDef
, name: str
, args: list[ Argument]
, return_type: Type
, self_type: Type|None
= None, tvar_def: TypeVarType|None
= None, is_classmethod: bool
= False, is_staticmethod: bool
= False):
(source)
¶
Adds a new method to a class definition.
def deserialize_and_fixup_type(data:
str|JsonDict
, api: SemanticAnalyzerPluginInterface
) -> Type
:
(source)
¶
Undocumented
def _get_bool_argument(ctx:
ClassDefContext
, expr: CallExpr
, name: str
, default: bool
) -> bool
:
(source)
¶
Return the boolean value for an argument to a call or the default if it's not found.