Function | clear_inference_tip_cache |
Clear the inference tips cache. |
Function | inference_tip |
Given an instance specific inference function, return a function to be given to AstroidManager().register_transform to set this inference function. |
Variable | InferFn |
Undocumented |
Function | _inference_tip_cached |
Cache decorator used for inference tips |
Variable | _cache |
Undocumented |
Given an instance specific inference function, return a function to be given to AstroidManager().register_transform to set this inference function.
Typical usage
AstroidManager().register_transform(Call, inference_tip(infer_named_tuple), predicate)
Note
Using an inference tip will override any previously set inference tip for the given node. Use a predicate in the transform to prevent excess overwrites.
Parameters | |
infer_function:InferFn | Undocumented |
raise_on_overwrite:bool | Undocumented |
bool raise_on_overwrite | Raise an InferenceOverwriteError
if the inference tip will overwrite another. Used for debugging |
Returns | |
InferFn | Undocumented |