diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2017-10-12 12:31:29 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2017-10-12 12:31:29 +0200 |
commit | 83697ea500e316742897635ea97389f8a7a0c694 (patch) | |
tree | ee4e770a9f54625947e55920ce8f47d465964010 /astroid/helpers.py | |
parent | 3592657a129019e1b88532da8efaf12a53835a91 (diff) | |
download | astroid-git-83697ea500e316742897635ea97389f8a7a0c694.tar.gz |
Fix lint warnings
Diffstat (limited to 'astroid/helpers.py')
-rw-r--r-- | astroid/helpers.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/astroid/helpers.py b/astroid/helpers.py index 62da56ea..52647d88 100644 --- a/astroid/helpers.py +++ b/astroid/helpers.py @@ -99,14 +99,15 @@ def safe_infer(node, context=None): inferit = node.infer(context=context) value = next(inferit) except exceptions.InferenceError: - return + return None try: next(inferit) - return # None if there is ambiguity on the inferred node + return None # None if there is ambiguity on the inferred node except exceptions.InferenceError: - return # there is some kind of ambiguity + return None# there is some kind of ambiguity except StopIteration: return value + return None def has_known_bases(klass, context=None): @@ -171,3 +172,4 @@ def class_instance_as_index(node): return result except exceptions.InferenceError: pass + return None |