mirror of https://gitlab.com/bashrc2/epicyon
Fix warnings
parent
2fe3da8f34
commit
9ef2a22b7a
17
pyjsonld.py
17
pyjsonld.py
|
@ -1676,8 +1676,8 @@ class JsonLdProcessor(object):
|
|||
:return: True if the triples are the same, False if not.
|
||||
"""
|
||||
for attr in ['subject', 'predicate', 'object']:
|
||||
if(t1[attr]['type'] != t2[attr]['type'] or
|
||||
t1[attr]['value'] != t2[attr]['value']):
|
||||
if t1[attr]['type'] != t2[attr]['type'] or \
|
||||
t1[attr]['value'] != t2[attr]['value']:
|
||||
return False
|
||||
|
||||
if t1['object'].get('language') != t2['object'].get('language'):
|
||||
|
@ -1718,8 +1718,8 @@ class JsonLdProcessor(object):
|
|||
|
||||
# recursively compact object
|
||||
if _is_object(element):
|
||||
if(options['link'] and '@id' in element and
|
||||
element['@id'] in options['link']):
|
||||
if options['link'] and '@id' in element and \
|
||||
element['@id'] in options['link']:
|
||||
# check for a linked element to reuse
|
||||
linked = options['link'][element['@id']]
|
||||
for link in linked:
|
||||
|
@ -1815,9 +1815,9 @@ class JsonLdProcessor(object):
|
|||
|
||||
# skip array processing for keywords that aren't
|
||||
# @graph or @list
|
||||
if(expanded_property != '@graph' and
|
||||
expanded_property != '@list' and
|
||||
_is_keyword(expanded_property)):
|
||||
if expanded_property != '@graph' and \
|
||||
expanded_property != '@list' and \
|
||||
_is_keyword(expanded_property):
|
||||
# use keyword alias and add value as is
|
||||
alias = self._compact_iri(active_ctx, expanded_property)
|
||||
JsonLdProcessor.add_value(rval, alias, expanded_value)
|
||||
|
@ -2536,7 +2536,8 @@ class JsonLdProcessor(object):
|
|||
len(node[RDF_FIRST]) == 1 and
|
||||
_is_array(node[RDF_REST]) and
|
||||
len(node[RDF_REST]) == 1 and
|
||||
(node_key_count == 3 or (node_key_count == 4 and
|
||||
(node_key_count == 3 or
|
||||
(node_key_count == 4 and
|
||||
_is_array(node.get('@type')) and
|
||||
len(node['@type']) == 1 and
|
||||
node['@type'][0] == RDF_LIST))):
|
||||
|
|
|
@ -23,7 +23,8 @@ from threads import begin_thread
|
|||
|
||||
def _update_post_schedule(base_dir: str, handle: str, httpd,
|
||||
max_scheduled_posts: int) -> None:
|
||||
"""Checks if posts are due to be delivered and if so moves them to the outbox
|
||||
"""Checks if posts are due to be delivered and if so moves them to
|
||||
the outbox
|
||||
"""
|
||||
schedule_index_filename = \
|
||||
base_dir + '/accounts/' + handle + '/schedule.index'
|
||||
|
|
Loading…
Reference in New Issue