module documentation
(source)

Undocumented

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​_decorator​_bool​_argument Return the bool argument for the decorator.
def add_method(ctx, name, args, return_type, self_type=None, tvar_def=None): (source)
Adds a new method to a class. Deprecated, use add_method_to_class() instead.
Parameters
ctx:ClassDefContextUndocumented
name:strUndocumented
args:List[Argument]Undocumented
return​_type:TypeUndocumented
self​_type:Optional[Type]Undocumented
tvar​_def:Optional[TypeVarType]Undocumented
def add_method_to_class(api, cls, name, args, return_type, self_type=None, tvar_def=None): (source)
Adds a new method to a class definition.
Parameters
api:Union[SemanticAnalyzerPluginInterface, CheckerPluginInterface]Undocumented
cls:ClassDefUndocumented
name:strUndocumented
args:List[Argument]Undocumented
return​_type:TypeUndocumented
self​_type:Optional[Type]Undocumented
tvar​_def:Optional[TypeVarType]Undocumented
def deserialize_and_fixup_type(data, api): (source)

Undocumented

Parameters
data:Union[str, JsonDict]Undocumented
api:SemanticAnalyzerPluginInterfaceUndocumented
Returns
TypeUndocumented
def _get_argument(call, name): (source)
Return the expression for the specific argument.
Parameters
call:CallExprUndocumented
name:strUndocumented
Returns
Optional[Expression]Undocumented
def _get_bool_argument(ctx, expr, name, default): (source)
Return the boolean value for an argument to a call or the default if it's not found.
Parameters
ctx:ClassDefContextUndocumented
expr:CallExprUndocumented
name:strUndocumented
default:boolUndocumented
Returns
boolUndocumented
def _get_decorator_bool_argument(ctx, name, default): (source)

Return the bool argument for the decorator.

This handles both @decorator(...) and @decorator.

Parameters
ctx:ClassDefContextUndocumented
name:strUndocumented
default:boolUndocumented
Returns
boolUndocumented