From ed0cf82946c65c0332b43c2174f1af50c81b811e Mon Sep 17 00:00:00 2001 From: Abyss Watcher Date: Thu, 10 Sep 2026 12:09:48 +0200 Subject: [PATCH] use "any" to avoid iterating the entire dataclasses.fields list --- volatility3/framework/interfaces/objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volatility3/framework/interfaces/objects.py b/volatility3/framework/interfaces/objects.py index 1228c4d0a..64a00398b 100644 --- a/volatility3/framework/interfaces/objects.py +++ b/volatility3/framework/interfaces/objects.py @@ -79,7 +79,7 @@ class ObjectInformation: raise KeyError(f"No {key} present in ObjectInformation") def __contains__(self, key): - return key in [field.name for field in dataclasses.fields(self)] + return any(field.name == key for field in dataclasses.fields(self)) class ObjectInterface(metaclass=abc.ABCMeta):