From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Fri, 24 Oct 2025 18:42:15 +0000 (+0100) Subject: make mypy happy X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=573345538a20929d8480b36e9459d0532bbc4962;p=thirdparty%2FPython%2Fcpython.git make mypy happy --- diff --git a/Tools/cases_generator/analyzer.py b/Tools/cases_generator/analyzer.py index a525a2bf7055..b206a0a4b985 100644 --- a/Tools/cases_generator/analyzer.py +++ b/Tools/cases_generator/analyzer.py @@ -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):