From 7eb0b1d2492e52ab53efa4da057aeefc37e03661 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 21 Mar 2023 14:08:54 -0400 Subject: [PATCH] Comment about `Struct.typecast()` conflict with frozen instances --- piker/data/types.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/piker/data/types.py b/piker/data/types.py index 1359526c..c37de233 100644 --- a/piker/data/types.py +++ b/piker/data/types.py @@ -80,6 +80,8 @@ class Struct( msgspec.msgpack.Encoder().encode(self) ) + # NOTE XXX: this won't work on frozen types! + # use ``.copy()`` above in such cases. def typecast( self, # fields: Optional[list[str]] = None,