diff --git a/entities.py b/entities.py index 2bed23a2ab762e710c2969b010b262e16fe61d15_ZW50aXRpZXMucHk=..f7f443e56208adec8946ea8bcce0fa5257cd0725_ZW50aXRpZXMucHk= 100644 --- a/entities.py +++ b/entities.py @@ -82,10 +82,10 @@ yield relation, ends -def composite_entities_graph(parent): +def composite_entities_graph(parent, **kwargs): """Yield arcs of a graph of compositely-related entities reachable from `parent` entity. An "arc" is a tuple `(child entity, (rtype, role), parent entity)`. """ for (rtype, role), ends in composite_schema_graph(parent._cw.vreg.schema, @@ -86,11 +86,12 @@ """Yield arcs of a graph of compositely-related entities reachable from `parent` entity. An "arc" is a tuple `(child entity, (rtype, role), parent entity)`. """ for (rtype, role), ends in composite_schema_graph(parent._cw.vreg.schema, - parent.cw_etype): + parent.cw_etype, + **kwargs): for child_etype in ends: rset = parent.related(rtype, role=role, targettypes=[child_etype]) for child in rset.entities(): yield child, (rtype, neg_role(role)), parent @@ -93,8 +94,8 @@ for child_etype in ends: rset = parent.related(rtype, role=role, targettypes=[child_etype]) for child in rset.entities(): yield child, (rtype, neg_role(role)), parent - for x in composite_entities_graph(child): + for x in composite_entities_graph(child, **kwargs): yield x