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

All Samples(36)  |  Call(30)  |  Derive(0)  |  Import(6)

        def raise_if_nothing_infered(func):
    def wrapper(*args, **kwargs):
        infered = False
        for node in func(*args, **kwargs):
            infered = True
            yield node
        if not infered:
            raise InferenceError()
    return wrapper
        


src/p/y/pylama_pylint-0.1.6/pylama_pylint/astroid/inference.py   pylama_pylint(Download)
from astroid.exceptions import (AstroidError,
    InferenceError, NoDefault, NotFoundError, UnresolvableName)
from astroid.bases import YES, Instance, InferenceContext, \
     _infer_stmts, copy_context, path_wrapper, raise_if_nothing_infered
from astroid.protocols import _arguments_infer_argname
            ## XXX log error ?
            continue
nodes.CallFunc._infer = path_wrapper(raise_if_nothing_infered(infer_callfunc))
 
 
            # XXX method / function
            context.boundnode = None
nodes.Getattr._infer = path_wrapper(raise_if_nothing_infered(infer_getattr))
nodes.AssAttr.infer_lhs = raise_if_nothing_infered(infer_getattr) # # won't work with a path wrapper
 
        raise InferenceError()
nodes.Subscript._infer = path_wrapper(infer_subscript)
nodes.Subscript.infer_lhs = raise_if_nothing_infered(infer_subscript)
 
 

src/p/y/pylama_pylint-0.1.6/astroid/inference.py   pylama_pylint(Download)
from astroid.exceptions import (AstroidError,
    InferenceError, NoDefault, NotFoundError, UnresolvableName)
from astroid.bases import YES, Instance, InferenceContext, \
     _infer_stmts, copy_context, path_wrapper, raise_if_nothing_infered
from astroid.protocols import _arguments_infer_argname
            ## XXX log error ?
            continue
nodes.CallFunc._infer = path_wrapper(raise_if_nothing_infered(infer_callfunc))
 
 
            # XXX method / function
            context.boundnode = None
nodes.Getattr._infer = path_wrapper(raise_if_nothing_infered(infer_getattr))
nodes.AssAttr.infer_lhs = raise_if_nothing_infered(infer_getattr) # # won't work with a path wrapper
 
        raise InferenceError()
nodes.Subscript._infer = path_wrapper(infer_subscript)
nodes.Subscript.infer_lhs = raise_if_nothing_infered(infer_subscript)
 
 

src/a/s/astroid-1.1.1/inference.py   astroid(Download)
from astroid.exceptions import (AstroidError,
    InferenceError, NoDefault, NotFoundError, UnresolvableName)
from astroid.bases import YES, Instance, InferenceContext, \
     _infer_stmts, copy_context, path_wrapper, raise_if_nothing_infered
from astroid.protocols import _arguments_infer_argname
            ## XXX log error ?
            continue
nodes.CallFunc._infer = path_wrapper(raise_if_nothing_infered(infer_callfunc))
 
 
            # XXX method / function
            context.boundnode = None
nodes.Getattr._infer = path_wrapper(raise_if_nothing_infered(infer_getattr))
nodes.AssAttr.infer_lhs = raise_if_nothing_infered(infer_getattr) # # won't work with a path wrapper
 
        raise InferenceError()
nodes.Subscript._infer = path_wrapper(infer_subscript)
nodes.Subscript.infer_lhs = raise_if_nothing_infered(infer_subscript)
 
 

src/p/y/pylama_pylint-0.1.6/pylama_pylint/astroid/protocols.py   pylama_pylint(Download)
from astroid.exceptions import InferenceError, NoDefault
from astroid.node_classes import unpack_infer
from astroid.bases import copy_context, \
     raise_if_nothing_infered, yes_if_nothing_infered, Instance, YES
from astroid.nodes import const_factory
            yield infered
 
nodes.For.assigned_stmts = raise_if_nothing_infered(for_assigned_stmts)
nodes.Comprehension.assigned_stmts = raise_if_nothing_infered(for_assigned_stmts)
 
    for infered in _resolve_asspart(self.value.infer(context), asspath, context):
        yield infered
nodes.Assign.assigned_stmts = raise_if_nothing_infered(assign_assigned_stmts)
nodes.AugAssign.assigned_stmts = raise_if_nothing_infered(assign_assigned_stmts)
 

src/p/y/pylama_pylint-0.1.6/astroid/protocols.py   pylama_pylint(Download)
from astroid.exceptions import InferenceError, NoDefault
from astroid.node_classes import unpack_infer
from astroid.bases import copy_context, \
     raise_if_nothing_infered, yes_if_nothing_infered, Instance, YES
from astroid.nodes import const_factory
            yield infered
 
nodes.For.assigned_stmts = raise_if_nothing_infered(for_assigned_stmts)
nodes.Comprehension.assigned_stmts = raise_if_nothing_infered(for_assigned_stmts)
 
    for infered in _resolve_asspart(self.value.infer(context), asspath, context):
        yield infered
nodes.Assign.assigned_stmts = raise_if_nothing_infered(assign_assigned_stmts)
nodes.AugAssign.assigned_stmts = raise_if_nothing_infered(assign_assigned_stmts)
 

src/a/s/astroid-1.1.1/protocols.py   astroid(Download)
from astroid.exceptions import InferenceError, NoDefault
from astroid.node_classes import unpack_infer
from astroid.bases import copy_context, \
     raise_if_nothing_infered, yes_if_nothing_infered, Instance, YES
from astroid.nodes import const_factory
            yield infered
 
nodes.For.assigned_stmts = raise_if_nothing_infered(for_assigned_stmts)
nodes.Comprehension.assigned_stmts = raise_if_nothing_infered(for_assigned_stmts)
 
    for infered in _resolve_asspart(self.value.infer(context), asspath, context):
        yield infered
nodes.Assign.assigned_stmts = raise_if_nothing_infered(assign_assigned_stmts)
nodes.AugAssign.assigned_stmts = raise_if_nothing_infered(assign_assigned_stmts)