mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-104504: Run mypy on cases_generator in CI (and blacken the code) (gh-108090)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
fd19509220
commit
28cab71f95
11 changed files with 313 additions and 194 deletions
|
@ -413,22 +413,22 @@ def write_components(
|
|||
return next_instr_is_set
|
||||
|
||||
|
||||
def write_single_instr_for_abstract_interp(
|
||||
instr: Instruction, out: Formatter
|
||||
):
|
||||
def write_single_instr_for_abstract_interp(instr: Instruction, out: Formatter) -> None:
|
||||
try:
|
||||
_write_components_for_abstract_interp(
|
||||
[Component(instr, instr.active_caches)],
|
||||
out,
|
||||
)
|
||||
except AssertionError as err:
|
||||
raise AssertionError(f"Error writing abstract instruction {instr.name}") from err
|
||||
raise AssertionError(
|
||||
f"Error writing abstract instruction {instr.name}"
|
||||
) from err
|
||||
|
||||
|
||||
def _write_components_for_abstract_interp(
|
||||
parts: list[Component],
|
||||
out: Formatter,
|
||||
):
|
||||
) -> None:
|
||||
managers = get_managers(parts)
|
||||
for mgr in managers:
|
||||
if mgr is managers[-1]:
|
||||
|
@ -438,5 +438,7 @@ def _write_components_for_abstract_interp(
|
|||
# NULL out the output stack effects
|
||||
for poke in mgr.pokes:
|
||||
if not poke.effect.size and poke.effect.name not in mgr.instr.unmoved_names:
|
||||
out.emit(f"PARTITIONNODE_OVERWRITE((_Py_PARTITIONNODE_t *)"
|
||||
f"PARTITIONNODE_NULLROOT, PEEK(-({poke.offset.as_index()})), true);")
|
||||
out.emit(
|
||||
f"PARTITIONNODE_OVERWRITE((_Py_PARTITIONNODE_t *)"
|
||||
f"PARTITIONNODE_NULLROOT, PEEK(-({poke.offset.as_index()})), true);"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue