module documentation

Utilities for writing overlays.

Class Param Internal representation of method parameters.
Function add_base_class Inserts base_cls into the MRO of cls.
Function make_method Make a method from params.
Constant PARAM_TYPES Undocumented
def add_base_class(node, cls, base_cls): (source)

Inserts base_cls into the MRO of cls.

def make_method(ctx, node, name, params=None, posonly_count=0, kwonly_params=None, return_type=None, self_param=None, varargs=None, kwargs=None, kind=pytd.MethodKind.METHOD): (source)

Make a method from params. Args: ctx: The context node: Node to create the method variable at name: The method name params: Positional params [type: [Param]] posonly_count: Number of positional-only parameters kwonly_params: Keyword only params [type: [Param]] return_type: Return type [type: PARAM_TYPES] self_param: Self param [type: Param, defaults to self: Any] varargs: Varargs param [type: Param, allows *args to be named and typed] kwargs: Kwargs param [type: Param, allows **kwargs to be named and typed] kind: The method kind Returns: A new method wrapped in a variable.