sforkowany z mirror/rnsutils
Improve pep8 compliance
rodzic
8dc4316fda
commit
25358be8ae
|
@ -21,13 +21,20 @@ def db_to_renoise_volume(volume):
|
||||||
|
|
||||||
|
|
||||||
def _elements_equal(e1, e2):
|
def _elements_equal(e1, e2):
|
||||||
if e1 is None and e2 is None: return True
|
if e1 is None and e2 is None:
|
||||||
if e1 is None or e2 is None: return False
|
return True
|
||||||
if e1.tag != e2.tag: return False
|
if e1 is None or e2 is None:
|
||||||
if e1.text != e2.text: return False
|
return False
|
||||||
if e1.tail != e2.tail: return False
|
if e1.tag != e2.tag:
|
||||||
if e1.attrib != e2.attrib: return False
|
return False
|
||||||
if len(e1) != len(e2): return False
|
if e1.text != e2.text:
|
||||||
|
return False
|
||||||
|
if e1.tail != e2.tail:
|
||||||
|
return False
|
||||||
|
if e1.attrib != e2.attrib:
|
||||||
|
return False
|
||||||
|
if len(e1) != len(e2):
|
||||||
|
return False
|
||||||
return all(_elements_equal(c1, c2) for c1, c2 in zip(e1.iterchildren(), e2.iterchildren()))
|
return all(_elements_equal(c1, c2) for c1, c2 in zip(e1.iterchildren(), e2.iterchildren()))
|
||||||
|
|
||||||
|
|
||||||
|
@ -184,6 +191,7 @@ class RenoiseInstrument(object):
|
||||||
|
|
||||||
@comment.setter
|
@comment.setter
|
||||||
def comment(self, value):
|
def comment(self, value):
|
||||||
|
# noinspection PyPep8Naming
|
||||||
E = objectify.E
|
E = objectify.E
|
||||||
|
|
||||||
if 'Comments' not in self.root.GlobalProperties.getchildren():
|
if 'Comments' not in self.root.GlobalProperties.getchildren():
|
||||||
|
@ -204,6 +212,7 @@ class RenoiseInstrument(object):
|
||||||
|
|
||||||
@tags.setter
|
@tags.setter
|
||||||
def tags(self, value):
|
def tags(self, value):
|
||||||
|
# noinspection PyPep8Naming
|
||||||
E = objectify.E
|
E = objectify.E
|
||||||
|
|
||||||
if 'Tags' not in self.root.GlobalProperties.getchildren():
|
if 'Tags' not in self.root.GlobalProperties.getchildren():
|
||||||
|
|
Ładowanie…
Reference in New Issue