[PATCH 3 of 5 seda] Make iter_external_rdefs function private

Sylvain Thenault sylvain.thenault at logilab.fr
Mon Apr 10 17:48:34 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 3354b1549baaae17ab4d9477123b0d9897d67200
# Parent  07350ed1e41071babe8e698f5435378704e96550
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:
-        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