From f29010469a8fd3899a0df4276c0f3423159a762b Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sun, 1 Sep 2024 02:09:09 -0400 Subject: [PATCH] doorcontrol: Define Credential as frozen to allow hashing --- doorcontrol/hid/Credential.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doorcontrol/hid/Credential.py b/doorcontrol/hid/Credential.py index 101cd12..fc10d92 100644 --- a/doorcontrol/hid/Credential.py +++ b/doorcontrol/hid/Credential.py @@ -21,7 +21,7 @@ class InvalidParity(InvalidHexCode): super().__init__(f"Bad {even_odd} parity") -@dataclasses.dataclass +@dataclasses.dataclass(frozen=True) class Credential: bits: bitstring.Bits