diff options
Diffstat (limited to 'astroid/inference.py')
-rw-r--r-- | astroid/inference.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/astroid/inference.py b/astroid/inference.py index 0a55b6e8..a0a933eb 100644 --- a/astroid/inference.py +++ b/astroid/inference.py @@ -520,6 +520,8 @@ def _is_not_implemented(const): def _invoke_binop_inference(instance, opnode, op, other, context, method_name): """Invoke binary operation inference on the given instance.""" methods = dunder_lookup.lookup(instance, method_name) + if context is not None: + context.boundnode = instance method = methods[0] inferred = next(method.infer(context=context)) return instance.infer_binary_op(opnode, op, other, context, inferred) |