From 9fdb44f42ae323c9fe76a2fc54027eb4055eb8cb Mon Sep 17 00:00:00 2001 From: Joshua Klein Date: Thu, 28 Mar 2024 09:16:16 -0400 Subject: [PATCH] Incomplete state --- pyteomics/proforma.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyteomics/proforma.py b/pyteomics/proforma.py index 8049724..3a17f58 100644 --- a/pyteomics/proforma.py +++ b/pyteomics/proforma.py @@ -658,6 +658,8 @@ def __reduce__(self): return self.__class__, (self.value, self.extra, self.group_id, self.style), self.__getstate__() def __getstate__(self): + if self._definition is None: + return None state = self._definition.copy() state['source'] = None return state