From ef0605e0cef3b5ca267a7d7778869397d37b0e31 Mon Sep 17 00:00:00 2001 From: Isaac To Date: Mon, 12 Aug 2024 13:55:59 -0700 Subject: [PATCH] Improve docs of `gen_linkml.translate_defs()` --- src/pydantic2linkml/gen_linkml.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pydantic2linkml/gen_linkml.py b/src/pydantic2linkml/gen_linkml.py index ad331f2f..2359321f 100644 --- a/src/pydantic2linkml/gen_linkml.py +++ b/src/pydantic2linkml/gen_linkml.py @@ -1192,10 +1192,13 @@ def _computed_field_schema(self, schema: core_schema.ComputedField) -> None: def translate_defs(module_names: Iterable[str]) -> SchemaDefinition: """ Translate Python objects, in the named modules and their submodules loaded to - `sys.modules`, to LinkML + `sys.modules`, to LinkML + :param module_names: The names to specify the modules and their submodules :return: A `SchemaDefinition` object representing the expressions of the Python objects in LinkML + + Note: The types of objects translated are those fetched by `tools.fetch_defs()` """ # Eliminate duplicates in the module names if type(module_names) is not set: