We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ba4547 commit 4fb2aecCopy full SHA for 4fb2aec
astroid/rebuilder.py
@@ -258,7 +258,7 @@ def _find_orelse_keyword(
258
start = node.orelse[0].lineno
259
260
# pylint: disable-next=unsubscriptable-object
261
- for index, line in enumerate(self._data[start - 1 :: -1]):
+ for index, line in enumerate(self._data[start - 1 : node.lineno : -1]):
262
if line.lstrip().startswith("else"):
263
# if start - index == 37:
264
# breakpoint()
0 commit comments