module documentation

Undocumented

Function add_attribute_to_class Adds a new attribute to a class definition. This currently only generates the symbol table entry and no corresponding AssignmentStatement
Function add_method Adds a new method to a class. Deprecated, use add_method_to_class() instead.
Function add_method_to_class Adds a new method to a class definition.
Function deserialize_and_fixup_type Undocumented
Function _get_argument Return the expression for the specific argument.
Function _get_bool_argument Return the boolean value for an argument to a call or the default if it's not found.
Function _get_callee_type Return the type of the callee, regardless of its syntatic form.
Function _get_decorator_bool_argument 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_argument(call: CallExpr, name: str) -> Expression|None: (source)

Return the expression for the specific argument.

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.

def _get_callee_type(call: CallExpr) -> CallableType|None: (source)

Return the type of the callee, regardless of its syntatic form.

def _get_decorator_bool_argument(ctx: ClassDefContext, name: str, default: bool) -> bool: (source)

Return the bool argument for the decorator. This handles both @decorator(...) and @decorator.