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
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 29, 2025
commit fa7f46b5af24e61e57bd2980ffae4ab04d84d356
4 changes: 3 additions & 1 deletion mypyc/irbuild/specialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,9 @@ 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(cast(PrimitiveDescription, desc), [obj], expr.line), pass_block, next_block
builder.primitive_op(cast(PrimitiveDescription, desc), [obj], expr.line),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here a slightly better way to narrow the type would be to use assert desc is not None before the call, but this is fine as well.

pass_block,
next_block,
)
if not is_last:
builder.activate_block(next_block)
Expand Down
Loading