[Python-modules-commits] [python-pyld] 158/276: Do not add subject references at top-level.

Wolfgang Borgert debacle at moszumanska.debian.org
Wed Oct 8 23:48:05 UTC 2014


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to branch master
in repository python-pyld.

commit 48208fe5edffd929dbc3a6186d3d209282c1ac3b
Author: Dave Longley <dlongley at digitalbazaar.com>
Date:   Tue Aug 6 13:46:47 2013 -0400

    Do not add subject references at top-level.
---
 lib/pyld/jsonld.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py
index 9874443..f46b364 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -2101,9 +2101,13 @@ class JsonLdProcessor:
                 graph = node['@graph'] = []
                 for s, n in sorted(graph_map[subject].items()):
                     n.pop('listHeadFor', None)
-                    graph.append(n)
+                    # only add full subjects to top-level
+                    if not _is_subject_reference(n):
+                        graph.append(n)
             node.pop('listHeadFor', None)
-            result.append(node)
+            # only add full subjects to top-level
+            if not _is_subject_reference(node):
+              result.append(node)
 
         return result
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pyld.git



More information about the Python-modules-commits mailing list