add docstrings for nodemarkers

This commit is contained in:
Ronny Pfannschmidt 2018-03-19 17:40:55 +01:00
parent 5e56e9b4f6
commit ced1316bc8
2 changed files with 12 additions and 1 deletions

View File

@ -369,6 +369,14 @@ class NodeKeywords(MappingMixin):
@attr.s(cmp=False, hash=False)
class NodeMarkers(object):
"""
internal strucutre for storing marks belongong to a node
..warning::
unstable api
"""
own_markers = attr.ib(default=attr.Factory(list))
def update(self, add_markers):

View File

@ -183,7 +183,10 @@ class Node(object):
self._markers.update([marker])
def find_markers(self, name):
"""find all marks with the given name on the node and its parents"""
"""find all marks with the given name on the node and its parents
:param str name: name of the marker
"""
for node in reversed(self.listchain()):
for mark in node._markers.find(name):
yield mark