add docstrings for nodemarkers
This commit is contained in:
parent
5e56e9b4f6
commit
ced1316bc8
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue