| Index: third_party/logilab/astroid/protocols.py
|
| diff --git a/third_party/logilab/astroid/protocols.py b/third_party/logilab/astroid/protocols.py
|
| index e7703a06f6aefcd5a52e5c260aa978a30d14b8bf..4dd515fd00f6a58438ed2c0ca133c2575dac5c9c 100644
|
| --- a/third_party/logilab/astroid/protocols.py
|
| +++ b/third_party/logilab/astroid/protocols.py
|
| @@ -23,7 +23,7 @@ __doctype__ = "restructuredtext en"
|
|
|
| from astroid.exceptions import InferenceError, NoDefault, NotFoundError
|
| from astroid.node_classes import unpack_infer
|
| -from astroid.bases import copy_context, \
|
| +from astroid.bases import InferenceContext, \
|
| raise_if_nothing_infered, yes_if_nothing_infered, Instance, YES
|
| from astroid.nodes import const_factory
|
| from astroid import nodes
|
| @@ -91,7 +91,7 @@ BIN_OP_IMPL = {'+': lambda a, b: a + b,
|
| '<<': lambda a, b: a << b,
|
| '>>': lambda a, b: a >> b,
|
| }
|
| -for key, impl in BIN_OP_IMPL.items():
|
| +for key, impl in list(BIN_OP_IMPL.items()):
|
| BIN_OP_IMPL[key+'='] = impl
|
|
|
| def const_infer_binary_op(self, operator, other, context):
|
| @@ -282,7 +282,8 @@ def _arguments_infer_argname(self, name, context):
|
| # if there is a default value, yield it. And then yield YES to reflect
|
| # we can't guess given argument value
|
| try:
|
| - context = copy_context(context)
|
| + if context is None:
|
| + context = InferenceContext()
|
| for infered in self.default_value(name).infer(context):
|
| yield infered
|
| yield YES
|
| @@ -294,13 +295,8 @@ def arguments_assigned_stmts(self, node, context, asspath=None):
|
| if context.callcontext:
|
| # reset call context/name
|
| callcontext = context.callcontext
|
| - context = copy_context(context)
|
| - context.callcontext = None
|
| - for infered in callcontext.infer_argument(self.parent, node.name, context):
|
| - yield infered
|
| - return
|
| - for infered in _arguments_infer_argname(self, node.name, context):
|
| - yield infered
|
| + return callcontext.infer_argument(self.parent, node.name, context)
|
| + return _arguments_infer_argname(self, node.name, context)
|
| nodes.Arguments.assigned_stmts = arguments_assigned_stmts
|
|
|
|
|
|
|