Commit bd3fae2f authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[cleanup] Fixes for recent flake8

parent 564ad2fb5af7
......@@ -43,6 +43,7 @@ def listdir(dirpath):
not fname.endswith('~') and
not isdir(join(dirpath, fname))]
data_files = [
# common files
[THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
......
......@@ -247,5 +247,6 @@ class ParentAndContainerTC(CubicWebTC):
self.assertIsNone(parent)
self.assertEqual(container.eid, transfer.eid)
if __name__ == '__main__':
unittest.main()
......@@ -88,6 +88,7 @@ def top_level_rule(cls, req, rset=None, entity=None, **kwargs):
return 1
return 0
top_level_rule_afs = copy_rtag(
afs, __name__,
is_instance(*['SEDA{0}Rule'.format(rule_type.capitalize())
......
......@@ -81,6 +81,7 @@ def unit_ref_vocabulary(form, field):
{'root': container.eid})
return [(label, str(eid)) for label, eid in rset]
affk.tag_subject_of(('SEDAArchiveUnitRefId', 'seda_archive_unit_ref_id_to', '*'),
{'choices': unit_ref_vocabulary})
......
......@@ -135,6 +135,7 @@ def uri_cardinality_vocabulary(form, field):
return [u'1']
return [u'0..1', u'1']
affk.tag_attribute(('SEDAUri', 'user_cardinality'),
{'choices': uri_cardinality_vocabulary})
......
......@@ -202,6 +202,7 @@ def seda_xsd():
_CleanerVisitor().clean(_SEDA_XSD.seda_elements('ArchiveTransfer')[0])
return _SEDA_XSD
_SEDA_XSD = None
......
......@@ -219,5 +219,6 @@ def ordered_attributes(mapping):
attributes.append('user_annotation')
return attributes
if __name__ == '__main__':
UICFGGenerator.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment