Commit e9046eba authored by Erik Hetzner's avatar Erik Hetzner

Quiet pylint

parent 1062ecc8
......@@ -7,20 +7,26 @@ class ZoteroJSONEncoder(json.JSONEncoder):
if isinstance(obj, CitationInfo):
retval = {}
# need to make a decision here at some point
if obj.citekey:
if obj.citekey:
retval['easyKey'] = obj.citekey
elif obj.id:
retval['id'] = obj.id
if obj.prefix: retval['prefix'] = "%s "%(obj.prefix) # ensure spaces in prefix, suffix
if obj.suffix: retval['suffix'] = " %s"%(obj.suffix)
if obj.label: retval['label'] = obj.label
if obj.locator: retval['locator'] = obj.locator
if obj.suppress_author: retval['suppress-author'] = obj.suppress_author
if obj.author_only: retval['author-only'] = obj.author_only
if obj.prefix:
retval['prefix'] = "%s "%(obj.prefix) # ensure spaces in prefix, suffix
if obj.suffix:
retval['suffix'] = " %s"%(obj.suffix)
if obj.label:
retval['label'] = obj.label
if obj.locator:
retval['locator'] = obj.locator
if obj.suppress_author:
retval['suppress-author'] = obj.suppress_author
if obj.author_only:
retval['author-only'] = obj.author_only
return retval
elif isinstance(obj, CitationCluster):
return { 'citationItems': obj.citations,
'properties' : { 'index' : obj.index,
'noteIndex' : obj.note_index } }
return {'citationItems': obj.citations,
'properties' : {'index' : obj.index,
'noteIndex' : obj.note_index}}
else: return super(ZoteroJSONEncoder, self).default(self, obj)
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