Skip to content

Commit

Permalink
[py3] pep8 stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrewe committed Oct 19, 2016
1 parent 3509e67 commit a3696e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions odml/format.py
Expand Up @@ -4,6 +4,7 @@
and mappings of xml-attributes to their python class equivalents
"""


class Format(object):
_map = {}
_rev_map = None
Expand All @@ -29,6 +30,7 @@ def __iter__(self):
def create(self, *args, **kargs):
return getattr(odml, self.__class__.__name__)(*args, **kargs)


class Value(Format):
_name = "value"
_args = {
Expand All @@ -44,6 +46,7 @@ class Value(Format):
}
_map = {'type': 'dtype'}


class Property(Format):
_name = "property"
_args = {
Expand All @@ -60,6 +63,7 @@ class Property(Format):
'type': 'dtype'
}


class Section(Format):
_name = "section"
_args = {
Expand All @@ -79,6 +83,7 @@ class Section(Format):
'property': 'properties',
}


class Document(Format):
_name = "odML"
_args = {
Expand Down
3 changes: 3 additions & 0 deletions odml/tools/dumper.py
Expand Up @@ -2,6 +2,7 @@
Dumps ODML-Structures
"""


def get_props(obj, props):
out = []
for p in props:
Expand All @@ -11,6 +12,7 @@ def get_props(obj, props):
out.append("%s=%s" % (p, repr(x)))
return ", ".join(out)


def dumpSection(section, indent=1):
if section is None:
return
Expand All @@ -25,6 +27,7 @@ def dumpSection(section, indent=1):
for sub in section.sections:
dumpSection(sub, indent * 2)


def dumpDoc(doc):
for sec in doc:
dumpSection(sec)

0 comments on commit a3696e0

Please sign in to comment.