diff options
author | Tomas Gavenciak <gavento@ucw.cz> | 2018-12-11 16:56:00 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-12-11 17:45:29 +0100 |
commit | 53350eef90acdf274b8129cdfb742d5bf3b01081 (patch) | |
tree | 18ac2fd744570c5d6baa8bf02e6c8239738d7f0a | |
parent | c88b7d5fa934e25ae426d8b918d6eb8de414682d (diff) | |
download | astroid-git-53350eef90acdf274b8129cdfb742d5bf3b01081.tar.gz |
Remove else after return/raise
-rw-r--r-- | astroid/decorators.py | 7 | ||||
-rw-r--r-- | astroid/rebuilder.py | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/astroid/decorators.py b/astroid/decorators.py index 433c230e..d24c588f 100644 --- a/astroid/decorators.py +++ b/astroid/decorators.py @@ -132,7 +132,6 @@ def raise_if_nothing_inferred(func, instance, args, kwargs): if error.args: # pylint: disable=not-a-mapping raise exceptions.InferenceError(**error.args[0]) - else: - raise exceptions.InferenceError( - "StopIteration raised without any error information." - ) + raise exceptions.InferenceError( + "StopIteration raised without any error information." + ) diff --git a/astroid/rebuilder.py b/astroid/rebuilder.py index 4a2d52ab..1b313ee2 100644 --- a/astroid/rebuilder.py +++ b/astroid/rebuilder.py @@ -982,7 +982,7 @@ class TreeRebuilder3(TreeRebuilder): body = [self.visit(child, newnode) for child in node.body] newnode.postinit(body, [self.visit(n, newnode) for n in node.finalbody]) return newnode - elif node.handlers: + if node.handlers: return self.visit_tryexcept(node, parent) return None |