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. |
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. :param bool raise_on_overwrite: Raise an `InferenceOverwriteError` if the inference tip will overwrite another. Used for debugging Typical usage .. sourcecode:: python 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.
@wrapt.decorator
def _inference_tip_cached(func:
def _inference_tip_cached(func:
InferFn
, instance: None
, args: typing.Any
, kwargs: typing.Any
) -> Iterator[ InferenceResult]
:
(source)
¶
Cache decorator used for inference tips.