[PATCH 3 of 5 seda] Make iter_external_rdefs function private

Sylvain Thenault sylvain.thenault at logilab.fr
Tue Apr 11 15:12:32 CEST 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1491833468 -7200
#      Mon Apr 10 16:11:08 2017 +0200
# Node ID 7791fde1c736869f0bc18d67e2d56f2f9475459e
# Parent  1b26606d7831152d718a1c8c321c45061c470e59
Make iter_external_rdefs function private

this is not part of the seda cube API.

diff --git a/cubicweb_seda/__init__.py b/cubicweb_seda/__init__.py
--- a/cubicweb_seda/__init__.py
+++ b/cubicweb_seda/__init__.py
@@ -30,11 +30,11 @@ def seda_profile_container_def(schema):
     """Define container for SEDAArchiveTransfer, as a list of (etype, parent_rdefs)."""
     return structure_def(schema, 'SEDAArchiveTransfer',
                          skipetypes=GRAPH_SKIP_ETYPES, skiprtypes=GRAPH_SKIP_RTYPES).items()
 
 
-def iter_external_rdefs(eschema, skip_rtypes=skip_rtypes_set(['container'])):
+def _iter_external_rdefs(eschema, skip_rtypes=skip_rtypes_set(['container'])):
     """Return an iterator on (rdef, role) of external relations from entity schema (i.e.
     non-composite relations).
     """
     for rschema, targets, role in eschema.relation_definitions():
         if rschema in skip_rtypes:
@@ -65,7 +65,7 @@ def iter_all_rdefs(schema, container_ety
                 yield rdef, role
 
                 if target not in visited:
                     visited.add(target)
                     stack.append(target)
-        for rdef, role in iter_external_rdefs(schema[etype]):
+        for rdef, role in _iter_external_rdefs(schema[etype]):
             yield rdef, role


More information about the saem-devel mailing list