From 4b7dad66e542890b15f2092ffb34fed225497494 Mon Sep 17 00:00:00 2001 From: m0namon Date: Thu, 16 Jan 2020 08:16:27 -0800 Subject: [PATCH] remove __eq__ fns --- .../certbot_apache/_internal/apacheparser.py | 32 ------------------- .../certbot_apache/_internal/augeasparser.py | 32 ------------------- 2 files changed, 64 deletions(-) diff --git a/certbot-apache/certbot_apache/_internal/apacheparser.py b/certbot-apache/certbot_apache/_internal/apacheparser.py index 3d94e3eae..bc74d210e 100644 --- a/certbot-apache/certbot_apache/_internal/apacheparser.py +++ b/certbot-apache/certbot_apache/_internal/apacheparser.py @@ -41,15 +41,6 @@ class ApacheCommentNode(ApacheParserNode): super(ApacheCommentNode, self).__init__(**kwargs) self.comment = comment - def __eq__(self, other): # pragma: no cover - if isinstance(other, self.__class__): - return (self.comment == other.comment and - self.dirty == other.dirty and - self.ancestors == other.ancestors and - self.metadata == other.metadata and - self.filepath == other.filepath) - return False - class ApacheDirectiveNode(ApacheParserNode): """ apacheconfig implementation of DirectiveNode interface """ @@ -62,17 +53,6 @@ class ApacheDirectiveNode(ApacheParserNode): self.enabled = enabled self.include = None - def __eq__(self, other): # pragma: no cover - if isinstance(other, self.__class__): - return (self.name == other.name and - self.filepath == other.filepath and - self.parameters == other.parameters and - self.enabled == other.enabled and - self.dirty == other.dirty and - self.ancestors == other.ancestors and - self.metadata == other.metadata) - return False - def set_parameters(self, _parameters): """Sets the parameters for DirectiveNode""" return @@ -85,18 +65,6 @@ class ApacheBlockNode(ApacheDirectiveNode): super(ApacheBlockNode, self).__init__(**kwargs) self.children = () - def __eq__(self, other): # pragma: no cover - if isinstance(other, self.__class__): - return (self.name == other.name and - self.filepath == other.filepath and - self.parameters == other.parameters and - self.children == other.children and - self.enabled == other.enabled and - self.dirty == other.dirty and - self.ancestors == other.ancestors and - self.metadata == other.metadata) - return False - def add_child_block(self, name, parameters=None, position=None): # pylint: disable=unused-argument """Adds a new BlockNode to the sequence of children""" new_block = ApacheBlockNode(name=assertions.PASS, diff --git a/certbot-apache/certbot_apache/_internal/augeasparser.py b/certbot-apache/certbot_apache/_internal/augeasparser.py index d7f6b425d..ea610c8c8 100644 --- a/certbot-apache/certbot_apache/_internal/augeasparser.py +++ b/certbot-apache/certbot_apache/_internal/augeasparser.py @@ -173,15 +173,6 @@ class AugeasCommentNode(AugeasParserNode): # self.comment = comment self.comment = comment - def __eq__(self, other): - if isinstance(other, self.__class__): - return (self.comment == other.comment and - self.filepath == other.filepath and - self.dirty == other.dirty and - self.ancestors == other.ancestors and - self.metadata == other.metadata) - return False - class AugeasDirectiveNode(AugeasParserNode): """ Augeas implementation of DirectiveNode interface """ @@ -194,17 +185,6 @@ class AugeasDirectiveNode(AugeasParserNode): if parameters: self.set_parameters(parameters) - def __eq__(self, other): - if isinstance(other, self.__class__): - return (self.name == other.name and - self.filepath == other.filepath and - self.parameters == other.parameters and - self.enabled == other.enabled and - self.dirty == other.dirty and - self.ancestors == other.ancestors and - self.metadata == other.metadata) - return False - def set_parameters(self, parameters): """ Sets parameters of a DirectiveNode or BlockNode object. @@ -248,18 +228,6 @@ class AugeasBlockNode(AugeasDirectiveNode): super(AugeasBlockNode, self).__init__(**kwargs) self.children = () - def __eq__(self, other): - if isinstance(other, self.__class__): - return (self.name == other.name and - self.filepath == other.filepath and - self.parameters == other.parameters and - self.children == other.children and - self.enabled == other.enabled and - self.dirty == other.dirty and - self.ancestors == other.ancestors and - self.metadata == other.metadata) - return False - # pylint: disable=unused-argument def add_child_block(self, name, parameters=None, position=None): # pragma: no cover """Adds a new BlockNode to the sequence of children"""