module documentation
Transform utilities (filters and decorator)
Function | clear |
Clear the inference tips cache. |
Function | inference |
Given an instance specific inference function, return a function to be given to AstroidManager().register_transform to set this inference function. |
Type Alias |
|
Undocumented |
Function | _inference |
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 | |
inferInferFn | Undocumented |
raisebool | Undocumented |
bool raise | Raise an InferenceOverwriteError
if the inference tip will overwrite another. Used for debugging |
Returns | |
InferFn | Undocumented |