Skip to content

Commit

Permalink
Merge pull request #135 from numba/renovate/pre-commit-mirrors-mypy-1.x
Browse files Browse the repository at this point in the history
Update pre-commit hook pre-commit/mirrors-mypy to v1.11.0
  • Loading branch information
esc authored Jul 23, 2024
2 parents e5b5008 + ee85c65 commit 8cae8b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ repos:
- id: flake8
# Static Type checking: MyPy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
rev: v1.11.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
12 changes: 7 additions & 5 deletions numba_rvsdg/core/datastructures/ast_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,8 @@ def transform(
lineno=0,
decorator_list=original.decorator_list,
returns=original.returns,
)
return fdef
) # type: ignore
return fdef # type: ignore

def lookup(self, item: Any) -> Any:
subregion_scfg = self.region_stack[-1].subregion
Expand All @@ -714,7 +714,7 @@ def codegen(self, block: Any) -> list[ast.AST]:
test = block.tree[-1].value # type: ignore
body = self.codegen(self.lookup(block.jump_targets[0]))
orelse = self.codegen(self.lookup(block.jump_targets[1]))
if_node = ast.If(test, body, orelse)
if_node = ast.If(test, body, orelse) # type: ignore
return block.tree[:-1] + [if_node]
elif block.fallthrough and type(block.tree[-1]) is ast.Return:
# The value of the ast.Return could be either None or an
Expand Down Expand Up @@ -850,8 +850,10 @@ def if_cascade(jump_targets: list[str]) -> list[ast.AST]:
# recurse for the rest of the jump_targets.
if_node = ast.If(
test=if_test,
body=self.codegen(self.lookup(current)),
orelse=if_cascade(jump_targets),
body=self.codegen(
self.lookup(current)
), # type: ignore
orelse=if_cascade(jump_targets), # type: ignore
)
return [if_node]

Expand Down

0 comments on commit 8cae8b8

Please sign in to comment.