Interfaces: Fix LGTM warning without changing behaviour

This commit is contained in:
Mike Auty
2021-02-07 20:50:16 +00:00
parent bf9329fa93
commit 130ae7e446
@@ -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