Skip to content

Commit 6159c26

Browse files
committed
backwards compatibility
1 parent c79b5ec commit 6159c26

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

refinery/lib/ole/pcode.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import struct as _struct
2323

2424
from dataclasses import dataclass, field
25-
from typing import NamedTuple
25+
from typing import NamedTuple, TYPE_CHECKING
2626

2727
from refinery.lib.ole.file import OleFile
2828
from refinery.lib.ole.vba import _codepage_to_codec, _find_vba_projects, decompress_stream
@@ -114,7 +114,10 @@ class RecordInfo:
114114
text: str
115115

116116

117-
OpcodeArg = str | TypeRef | VarInfo | ArgInfo | FuncInfo | DimScope | CoerceType | RecordInfo
117+
if TYPE_CHECKING:
118+
OpcodeArg = str | TypeRef | VarInfo | ArgInfo | FuncInfo | DimScope | CoerceType | RecordInfo
119+
else:
120+
OpcodeArg = str
118121

119122

120123
class PCodeLine(NamedTuple):

0 commit comments

Comments
 (0)