address comments

This commit is contained in:
sydneyli 2020-01-06 14:16:57 -08:00
parent 9084fd7b74
commit 92506b1f6d
2 changed files with 9 additions and 9 deletions

View file

@ -28,7 +28,7 @@ class ApacheParserNode(interfaces.ParserNode):
"""Find ancestor BlockNodes with a given name"""
return [ApacheBlockNode(name=assertions.PASS,
parameters=assertions.PASS,
ancestors=self,
ancestors=(self),
filepath=assertions.PASS,
metadata=self.metadata)]
@ -101,7 +101,7 @@ class ApacheBlockNode(ApacheDirectiveNode):
"""Adds a new BlockNode to the sequence of children"""
new_block = ApacheBlockNode(name=assertions.PASS,
parameters=assertions.PASS,
ancestors=self,
ancestors=(self),
filepath=assertions.PASS,
metadata=self.metadata)
self.children += (new_block,)
@ -111,7 +111,7 @@ class ApacheBlockNode(ApacheDirectiveNode):
"""Adds a new DirectiveNode to the sequence of children"""
new_dir = ApacheDirectiveNode(name=assertions.PASS,
parameters=assertions.PASS,
ancestors=self,
ancestors=(self),
filepath=assertions.PASS,
metadata=self.metadata)
self.children += (new_dir,)
@ -122,7 +122,7 @@ class ApacheBlockNode(ApacheDirectiveNode):
"""Adds a new CommentNode to the sequence of children"""
new_comment = ApacheCommentNode(comment=assertions.PASS,
ancestors=self,
ancestors=(self),
filepath=assertions.PASS,
metadata=self.metadata)
self.children += (new_comment,)
@ -132,7 +132,7 @@ class ApacheBlockNode(ApacheDirectiveNode):
"""Recursive search of BlockNodes from the sequence of children"""
return [ApacheBlockNode(name=assertions.PASS,
parameters=assertions.PASS,
ancestors=self,
ancestors=(self),
filepath=assertions.PASS,
metadata=self.metadata)]
@ -140,14 +140,14 @@ class ApacheBlockNode(ApacheDirectiveNode):
"""Recursive search of DirectiveNodes from the sequence of children"""
return [ApacheDirectiveNode(name=assertions.PASS,
parameters=assertions.PASS,
ancestors=self,
ancestors=(self),
filepath=assertions.PASS,
metadata=self.metadata)]
def find_comments(self, comment, exact=False): # pylint: disable=unused-argument
"""Recursive search of DirectiveNodes from the sequence of children"""
return [ApacheCommentNode(comment=assertions.PASS,
ancestors=self,
ancestors=(self),
filepath=assertions.PASS,
metadata=self.metadata)]

View file

@ -132,8 +132,8 @@ class ParserNode(object):
ParserNode objects should have the following attributes:
# Reference to ancestor node(s), empty if the node is the root node of the
# configuration tree. This node can have multiple ancestors in the case
# that it is the root of a file included by multiple files.
# configuration tree. This node can have multiple ancestors if it is in
# a file included by multiple files.
ancestors: Tuple[ParserNode]
# True if this node has been modified since last save.