Skip to content

Commit 1b2ac02

Browse files
update docstring
1 parent 1bcfec3 commit 1b2ac02

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

linkml_runtime/utils/schemaview.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,29 @@ def imports_closure(self, imports: bool = True, traverse: Optional[bool] = None,
212212
"""
213213
Return all imports
214214
215-
:param traverse: if true, traverse recursively
215+
Objects in imported classes override one another in a "python-like" order -
216+
from the point of view of the importing schema, imports will override one
217+
another from first to last, recursively for each layer of imports.
218+
219+
An import tree like::
220+
221+
- main
222+
- s1
223+
- s1_1
224+
- s1_2
225+
- s1_2_1
226+
- s1_2_2
227+
- s2
228+
- s2_1
229+
- s2_2
230+
231+
will override objects with the same name, in order::
232+
233+
['s1_1', 's1_2_1', 's1_2_2', 's1_2', 's1', 's2_1', 's2_2', 's2']
234+
235+
:param imports: bool (default: ``True`` ) include imported schemas, recursively
236+
:param traverse: bool, optional (default: ``True`` ) (Deprecated, use
237+
``imports`` ). if true, traverse recursively
216238
:return: all schema names in the transitive reflexive imports closure
217239
"""
218240
if self.schema_map is None:

0 commit comments

Comments
 (0)