diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2018-10-10 14:49:03 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-10-10 14:49:03 +0200 |
commit | 833456da38a982e75a9523d21c42a225675e5a18 (patch) | |
tree | ff424567f730446d23ffe227b7f045ca239250f5 /astroid | |
parent | 36fa294e9b84885d95a03b1fbc07da63e6d6a79b (diff) | |
download | astroid-git-833456da38a982e75a9523d21c42a225675e5a18.tar.gz |
Use yield from
Diffstat (limited to 'astroid')
-rw-r--r-- | astroid/inference.py | 3 | ||||
-rw-r--r-- | astroid/protocols.py | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/astroid/inference.py b/astroid/inference.py index f01523ee..f66b1b63 100644 --- a/astroid/inference.py +++ b/astroid/inference.py @@ -735,8 +735,7 @@ def _infer_binary_operation(left, right, binary_opnode, context, flow_factory): yield util.Uninferable return - for result in results: - yield result + yield from results return # The operation doesn't seem to be supported so let the caller know about it yield util.BadBinaryOperationMessage(left_type, binary_opnode.op, right_type) diff --git a/astroid/protocols.py b/astroid/protocols.py index 7b8834e5..0776f146 100644 --- a/astroid/protocols.py +++ b/astroid/protocols.py @@ -337,8 +337,7 @@ def _arguments_infer_argname(self, name, context): if context and context.callcontext: call_site = arguments.CallSite(context.callcontext, context.extra_context) - for value in call_site.infer_argument(self.parent, name, context): - yield value + yield from call_site.infer_argument(self.parent, name, context) return if name == self.vararg: |