Skip to content

Commit 885ea01

Browse files
committed
Add pragma
1 parent 8bcf914 commit 885ea01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

astroid/rebuilder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,7 @@ def find_keyword(begin: int, end: int) -> Tuple[Optional[int], Optional[int]]:
14051405
for t in tokens[::-1]:
14061406
if t.type == token.NAME and t.string in {"else", "elif"}:
14071407
return node.lineno + t.start[0] - 1, t.start[1]
1408-
return None, None
1408+
raise AssertionError() # pragma: no cover # Shouldn't be reached.
14091409

14101410
return find_keyword(node.lineno - 1, end_lineno)
14111411

0 commit comments

Comments
 (0)