Skip to content

Commit 8e3f9ec

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 5776418 commit 8e3f9ec

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

mypyc/transform/spill.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from mypyc.analysis.dataflow import analyze_live_regs, get_cfg, AnalysisResult
5+
from mypyc.analysis.dataflow import AnalysisResult, analyze_live_regs, get_cfg
66
from mypyc.common import TEMP_ATTR_NAME
77
from mypyc.ir.class_ir import ClassIR
88
from mypyc.ir.func_ir import FuncIR
@@ -41,11 +41,11 @@ def spill_regs(
4141
blocks: list[BasicBlock], env: ClassIR, to_spill: set[Value], live: AnalysisResult[Value]
4242
) -> list[BasicBlock]:
4343
for op in blocks[0].ops:
44-
if isinstance(op, GetAttr) and op.attr == '__mypyc_env__':
44+
if isinstance(op, GetAttr) and op.attr == "__mypyc_env__":
4545
env_reg = op
4646
break
4747
else:
48-
raise AssertionError('could not find __mypyc_env__')
48+
raise AssertionError("could not find __mypyc_env__")
4949

5050
spill_locs = {}
5151
for i, val in enumerate(to_spill):
@@ -85,7 +85,6 @@ def spill_regs(
8585
# XXX: but could we have a regular branch?
8686
and not (isinstance(op, Branch) and op.op == Branch.IS_ERROR)
8787
):
88-
8988
new_sources: list[Value] = []
9089
for src in op.sources():
9190
if src in spill_locs:

mypyc/transform/uninit.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ def split_blocks_at_uninits(
7979
continue
8080

8181
new_block, error_block = BasicBlock(), BasicBlock()
82-
new_block.error_handler = error_block.error_handler = (
83-
cur_block.error_handler)
82+
new_block.error_handler = error_block.error_handler = cur_block.error_handler
8483
new_blocks += [error_block, new_block]
8584

8685
if not src.type.error_overlap:

0 commit comments

Comments
 (0)