summaryrefslogtreecommitdiff
path: root/astroid/helpers.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2018-06-14 08:25:28 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2018-06-14 08:45:49 +0200
commit7e0c84151781dc4879a4d8807837a8b9be03549d (patch)
tree1c515d676ac54b0214820c637242a1c3e0f3350c /astroid/helpers.py
parent7de56b0416f575b589f29ed78df66182b33f2698 (diff)
downloadastroid-git-7e0c84151781dc4879a4d8807837a8b9be03549d.tar.gz
Fix linting
Diffstat (limited to 'astroid/helpers.py')
-rw-r--r--astroid/helpers.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/astroid/helpers.py b/astroid/helpers.py
index 14148ad8..6ed08f2f 100644
--- a/astroid/helpers.py
+++ b/astroid/helpers.py
@@ -260,9 +260,8 @@ def object_len(node, context=None):
# Remove StopIteration catch when #507 is fixed
except StopIteration:
raise exceptions.InferenceError(node=node)
- if (isinstance(result_of_len, nodes.Const) and result_of_len.pytype() == "builtins.int"):
+ if isinstance(result_of_len, nodes.Const) and result_of_len.pytype() == "builtins.int":
return result_of_len.value
- else:
- raise exceptions.AstroidTypeError(
- "'{}' object cannot be interpreted as an integer"
- .format(result_of_len))
+ raise exceptions.AstroidTypeError(
+ "'{}' object cannot be interpreted as an integer"
+ .format(result_of_len))