From 130ae7e446d1cc1ac4957418e2b8a57a48b77733 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Sun, 7 Feb 2021 20:50:16 +0000 Subject: [PATCH] Interfaces: Fix LGTM warning without changing behaviour --- volatility3/framework/interfaces/configuration.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/volatility3/framework/interfaces/configuration.py b/volatility3/framework/interfaces/configuration.py index 770ac0b4e..396926b68 100644 --- a/volatility3/framework/interfaces/configuration.py +++ b/volatility3/framework/interfaces/configuration.py @@ -477,6 +477,11 @@ class ClassRequirement(RequirementInterface): super().__init__(*args, **kwargs) self._cls = None + def __eq__(self, other): + # We can just use super because it checks all member of `__dict__` + # This appeases LGTM and does the right thing + return super().__eq__(other) + @property def cls(self) -> Type: """Contains the actual chosen class based on the configuration value's @@ -525,6 +530,11 @@ class ConstructableRequirementInterface(RequirementInterface): self.add_requirement(ClassRequirement("class", "Class of the constructable requirement")) self._current_class_requirements = set() + def __eq__(self, other): + # We can just use super because it checks all member of `__dict__` + # This appeases LGTM and does the right thing + return super().__eq__(other) + @abstractmethod def construct(self, context: 'interfaces.context.ContextInterface', config_path: str) -> None: """Method for constructing within the context any required elements