From 4292c27bea13a5ba0423c69e0ab3d0caa4a04e38 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Sat, 18 Sep 2021 13:42:53 -0400 Subject: Make some additional dataclasses frozen --- python/basicblock.py | 2 +- python/function.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'python') diff --git a/python/basicblock.py b/python/basicblock.py index 887f6679..623cc3ed 100644 --- a/python/basicblock.py +++ b/python/basicblock.py @@ -30,7 +30,7 @@ from . import architecture from . import highlight as _highlight from . import function as _function -@dataclass +@dataclass(frozen=True) class BasicBlockEdge: type:BranchType source:'BasicBlock' diff --git a/python/function.py b/python/function.py index 229fd2f6..42e88fa3 100644 --- a/python/function.py +++ b/python/function.py @@ -69,9 +69,9 @@ ILInstructionType = Union['lowlevelil.LowLevelILInstruction', 'mediumlevelil.Med def _function_name_(): return inspect.stack()[1][0].f_code.co_name -@dataclass +@dataclass(frozen=True) class ArchAndAddr: - arch:Optional['architecture.Architecture'] + arch:'architecture.Architecture' addr:int def __repr__(self): -- cgit v1.3.1