Skip to content

Commit

Permalink
Better documentation
Browse files Browse the repository at this point in the history
Remove useless __init__
  • Loading branch information
tcezard committed Jun 23, 2017
1 parent 3540fe2 commit 5c0048e
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions pyclarity_lims/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@ def _delitem(self, key):


class XmlElementAttributeDict(XmlDictionary, Nestable):
"""Dictionary of attributes for a specific xml element. It will find all the ta
"""
Dictionary of attributes for a specific xml element.
It will find all the elements with the specified tag and use the one in the provided position
then put all attributes of that tag in a dict.
The key is the attribute's name and value is the attribute's value.
"""

Expand Down Expand Up @@ -262,14 +265,12 @@ def _delitem(self, key):


class XmlAction(XmlElementAttributeDict):
def __init__(self, instance, tag, nesting, *args, **kwargs):
XmlElementAttributeDict.__init__(
self, instance, tag=tag,
position=kwargs.pop('position', 0),
nesting=nesting,
*args, **kwargs
)

"""
One Action of a list of action. The Action is store in an XmlElementAttributeDict with specific keys
artifact: The Artifact associated with this Action
step: The next step associated with this action
rework-step: The step associated with this action when the Artifact need to be requeued
"""
def _parse_element(self, element, **kwargs):
from pyclarity_lims.entities import Artifact, Step
for k, v in element.attrib.items():
Expand Down

0 comments on commit 5c0048e

Please sign in to comment.