class MethodAdder: (source)
Helper to add methods to a TypeInfo.
ctx: The ClassDefCtx we are using on which we will add methods.
Method | __init__ |
Undocumented |
Method | add_method |
Add a method: def <method_name>(self, <args>) -> <ret_type>): ... to info. |
Instance Variable | ctx |
Undocumented |
Instance Variable | self_type |
Undocumented |
Add a method: def <method_name>(self, <args>) -> <ret_type>): ... to info.
self_type: The type to use for the self argument or None to use the inferred self type. tvd: If the method is generic these should be the type variables.
Parameters | |
method_name:str | Undocumented |
args:List[ | Undocumented |
ret_type:Type | Undocumented |
self_type:Optional[ | Undocumented |
tvd:Optional[ | Undocumented |