]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
make mypy happy
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Fri, 24 Oct 2025 18:42:15 +0000 (19:42 +0100)
committerKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Fri, 24 Oct 2025 18:42:15 +0000 (19:42 +0100)
Tools/cases_generator/analyzer.py

index a525a2bf705559bab8536fa87f62150ea97e6160..b206a0a4b985d34a016c777cffd172c4857c468e 100644 (file)
@@ -890,7 +890,7 @@ def stmt_escapes(stmt: Stmt) -> bool:
     else:
         assert False, "Unexpected statement type"
 
-def stmt_has_jump_on_unpredictable_path_body(stmts: list[Stmt] | None, branches_seen: int) -> bool:
+def stmt_has_jump_on_unpredictable_path_body(stmts: list[Stmt] | None, branches_seen: int) -> tuple[bool, int]:
     if not stmts:
         return False, branches_seen
     predict = False
@@ -901,7 +901,7 @@ def stmt_has_jump_on_unpredictable_path_body(stmts: list[Stmt] | None, branches_
         seen += seen_body
     return predict, seen
 
-def stmt_has_jump_on_unpredictable_path(stmt: Stmt, branches_seen: int) -> bool:
+def stmt_has_jump_on_unpredictable_path(stmt: Stmt, branches_seen: int) -> tuple[bool, int]:
     if isinstance(stmt, BlockStmt):
         return stmt_has_jump_on_unpredictable_path_body(stmt.body, branches_seen)
     elif isinstance(stmt, SimpleStmt):