summaryrefslogtreecommitdiff
path: root/astroid/protocols.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2017-12-15 10:26:52 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2017-12-15 10:26:52 +0100
commite6e527687c34a57cb4411f8be216908cbe370965 (patch)
tree741e428c124c7b157148158894c60804f078ff7d /astroid/protocols.py
parent8c3ce1817c23b2461a6ea5626f92214050f3f936 (diff)
downloadastroid-git-e6e527687c34a57cb4411f8be216908cbe370965.tar.gz
Filter non-inferables nodes when inferring binary operations
Close #467
Diffstat (limited to 'astroid/protocols.py')
-rw-r--r--astroid/protocols.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/astroid/protocols.py b/astroid/protocols.py
index d7a38f58..00b0736c 100644
--- a/astroid/protocols.py
+++ b/astroid/protocols.py
@@ -135,7 +135,8 @@ nodes.Const.infer_binary_op = const_infer_binary_op
def _multiply_seq_by_int(self, opnode, other, context):
node = self.__class__(parent=opnode)
elts = []
- for elt in self.elts:
+ filtered_elts = (elt for elt in self.elts if elt is not util.Uninferable)
+ for elt in filtered_elts:
infered = helpers.safe_infer(elt, context)
if infered is None:
infered = util.Uninferable