From 61f5a979a02ad5179acb93aa27f19c2d7cac4433 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 3 Jul 2023 20:40:16 +0300 Subject: [PATCH] Keep forward references in NamedTuples to due to mypyc bug --- mypyc/ir/class_ir.py | 2 +- mypyc/ir/ops.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mypyc/ir/class_ir.py b/mypyc/ir/class_ir.py index a577990688b0..682e30629118 100644 --- a/mypyc/ir/class_ir.py +++ b/mypyc/ir/class_ir.py @@ -70,7 +70,7 @@ class VTableMethod(NamedTuple): - cls: ClassIR + cls: "ClassIR" name: str method: FuncIR shadow_method: FuncIR | None diff --git a/mypyc/ir/ops.py b/mypyc/ir/ops.py index 29c47a1cde14..cb8d9662820c 100644 --- a/mypyc/ir/ops.py +++ b/mypyc/ir/ops.py @@ -1574,5 +1574,5 @@ def visit_keep_alive(self, op: KeepAlive) -> T: # (Serialization and deserialization *will* be used for incremental # compilation but so far it is not hooked up to anything.) class DeserMaps(NamedTuple): - classes: dict[str, ClassIR] - functions: dict[str, FuncIR] + classes: dict[str, "ClassIR"] + functions: dict[str, "FuncIR"]