mirror of
https://github.com/wassname/sloth.git
synced 2026-07-08 01:54:59 +08:00
Fixes for Python 3
This commit is contained in:
@@ -200,7 +200,7 @@ class OkapiAnnotationContainer(AnnotationContainer):
|
||||
"""
|
||||
def convertAnnotationPropertiesMapToDict(self, properties):
|
||||
propdict = {}
|
||||
for k, v in properties.iteritems():
|
||||
for k, v in properties.items():
|
||||
propdict[k] = v
|
||||
return propdict
|
||||
|
||||
@@ -241,7 +241,7 @@ class OkapiAnnotationContainer(AnnotationContainer):
|
||||
Converts a dict to a AnnotationPropertiesMap
|
||||
"""
|
||||
def convertDictToAnnotationPropertiesMap(self, annotation, propdict):
|
||||
for k, v in propdict.iteritems():
|
||||
for k, v in propdict.items():
|
||||
if k != 'annotations' or k != 'frames':
|
||||
annotation.set_str(k, str(v))
|
||||
return annotation
|
||||
|
||||
@@ -18,7 +18,7 @@ class ItemInserter(QObject):
|
||||
self._prefix = prefix
|
||||
self._ann = {}
|
||||
if default_properties is not None:
|
||||
self._ann = dict(self._default_properties.iteritems())
|
||||
self._ann = dict(self._default_properties.items())
|
||||
self._commit = commit
|
||||
self._item = None
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class CopyAnnotationsPlugin(QObject):
|
||||
prev = current.getPreviousSibling()
|
||||
if prev is not None:
|
||||
for annotation in prev.children():
|
||||
copied = dict(annotation.iteritems())
|
||||
copied = dict(annotation.items())
|
||||
current.addAnnotation(copied)
|
||||
|
||||
def action(self):
|
||||
|
||||
Reference in New Issue
Block a user