Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Given an instance specific inference function, return a function to be
given to MANAGER.register_transform to set this inference function.

Typical usage

.. sourcecode:: python

   MANAGER.register_transform(CallFunc, inference_tip(infer_named_tuple),
                              AsStringRegexpPredicate('namedtuple', 'func'))

        def inference_tip(infer_function):
    """Given an instance specific inference function, return a function to be
    given to MANAGER.register_transform to set this inference function.

    Typical usage

    .. sourcecode:: python

       MANAGER.register_transform(CallFunc, inference_tip(infer_named_tuple),
                                  AsStringRegexpPredicate('namedtuple', 'func'))
    """
    def transform(node, infer_function=infer_function):
        node._explicit_inference = infer_function
        return node
    return transform
        


src/p/y/pylama_pylint-0.1.6/pylama_pylint/astroid/brain/py2stdlib.py   pylama_pylint(Download)
"""
 
from astroid import MANAGER, AsStringRegexpPredicate, UseInferenceDefault, inference_tip, YES
from astroid import exceptions
from astroid import nodes
    return iter([class_node])
 
MANAGER.register_transform(nodes.CallFunc, inference_tip(infer_named_tuple),
                           AsStringRegexpPredicate('namedtuple', 'func'))
 

src/a/s/astroid-1.1.1/brain/py2stdlib.py   astroid(Download)
import sys
 
from astroid import MANAGER, AsStringRegexpPredicate, UseInferenceDefault, inference_tip, YES
from astroid import exceptions
from astroid import nodes
    return iter([class_node])
 
MANAGER.register_transform(nodes.CallFunc, inference_tip(infer_named_tuple),
                           AsStringRegexpPredicate('namedtuple', 'func'))