diff options
author | Michał Masłowski <m.maslowski@clearcode.cc> | 2017-07-08 13:23:16 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2017-07-08 14:23:16 +0300 |
commit | d80bc3f9254044be2c82c3acfcbe282d10610bc4 (patch) | |
tree | eacc23e71ef7f68af69013fb7b9763d87fc6ccf0 /astroid/inference.py | |
parent | 7fe17123d663788de91441e32d50baf0458f4e5a (diff) | |
download | astroid-git-d80bc3f9254044be2c82c3acfcbe282d10610bc4.tar.gz |
Catch _NonDeducibleTypeHierarchy in inference._infer_augassign (#443)
Similarly to _infer_binop, we have to handle exceptions raised by
helpers.is_subtype and helpers.is_supertype in _infer_augassign.
Diffstat (limited to 'astroid/inference.py')
-rw-r--r-- | astroid/inference.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/astroid/inference.py b/astroid/inference.py index f77ad19a..e0f93b0d 100644 --- a/astroid/inference.py +++ b/astroid/inference.py @@ -725,12 +725,10 @@ def _infer_augassign(self, context=None): return try: - results = _infer_binary_operation(lhs, rhs, self, context, _get_aug_flow) + for result in _infer_binary_operation(lhs, rhs, self, context, _get_aug_flow): + yield result except exceptions._NonDeducibleTypeHierarchy: yield util.Uninferable - else: - for result in results: - yield result @decorators.path_wrapper |