Skip to content

Commit 1e46999

Browse files
Fix pyright (#623)
This PR address small issue that make pyright CI failed. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 063d0cc commit 1e46999

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/kirin/dialects/ilist/rewrite/to_range_loop.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def rewrite_Statement(self, node: Statement) -> RewriteResult:
3737

3838
ele_arg = body_block.args[0]
3939
index = body_block.args.insert_from(0, types.Int)
40+
assert body_block.first_stmt is not None, "first stmt does not exists"
4041
(ele_getitem := py.GetItem(iterable, index)).insert_before(
4142
body_block.first_stmt
4243
)

0 commit comments

Comments
 (0)