Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use cast
  • Loading branch information
BobTheBuidler authored Sep 29, 2025
commit 4e1596ce24a71b9fa9096cf9ca79cc37c0aef0b8
5 changes: 3 additions & 2 deletions mypyc/irbuild/specialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from __future__ import annotations

from typing import Callable, Final, Optional
from typing import Callable, Final, Optional, cast

from mypy.nodes import (
ARG_NAMED,
Expand All @@ -40,6 +40,7 @@
Call,
Extend,
Integer,
PrimitiveDescription,
RaiseStandardError,
Register,
Truncate,
Expand Down Expand Up @@ -641,7 +642,7 @@ def translate_isinstance(builder: IRBuilder, expr: CallExpr, callee: RefExpr) ->
is_last = i == len(descs) - 1
next_block = fail_block if is_last else BasicBlock()
builder.add_bool_branch(
builder.primitive_op(desc, [obj], expr.line), pass_block, next_block # type: ignore [arg-type]
builder.primitive_op(cast(PrimitiveDescription, desc), [obj], expr.line), pass_block, next_block
)
if not is_last:
builder.activate_block(next_block)
Expand Down
Loading