From 0fca95e3d77b9a27073515694e573ee19b01bea4 Mon Sep 17 00:00:00 2001
From: Alexander Kreft <akreft@trineo.org>
Date: Wed, 15 Sep 2021 14:07:17 +0200
Subject: [PATCH] MAINT: docstring

---
 src/caosdb/common/models.py | 82 ++++++++++++++++++++++---------------
 1 file changed, 49 insertions(+), 33 deletions(-)

diff --git a/src/caosdb/common/models.py b/src/caosdb/common/models.py
index cf54983e..6d30e64b 100644
--- a/src/caosdb/common/models.py
+++ b/src/caosdb/common/models.py
@@ -434,27 +434,23 @@ class Entity(object):
         parent : Entity or int or str or None
             The parent entity, either specified by the Entity object
             itself, or its id or its name. Default is None.
-        **kwargs : dict, optional
-            Additional keyword arguments for specifying the parent by
-            name or id, and for specifying the mode of inheritance.
-
-            id : int
-                Integer id of the parent entity. Ignored if `parent`
-                is not None.
-            name : str
-                Name of the parent entity. Ignored if `parent is not
-                none`.
-            inheritance : str
-                One of ``obligatory``, ``recommended``, ``suggested``, or ``fix``. Specifies the
-                minimum importance which parent properties need to have to be inherited by this
-                entity. If no `inheritance` is given, no properties will be inherited by the child.
-                This parameter is case-insensitive.
-
-                Note that the behaviour is currently not yet specified when assigning parents to
-                Records, it only works for inheritance of RecordTypes (and Properties).
-
-                For more information, it is recommended to look into the
-                :ref:`data insertion tutorial<tutorial-inheritance-properties>`.
+        id : int
+            Integer id of the parent entity. Ignored if `parent`
+            is not None.
+        name : str
+            Name of the parent entity. Ignored if `parent is not
+            none`.
+        inheritance : str
+            One of ``obligatory``, ``recommended``, ``suggested``, or ``fix``. Specifies the
+            minimum importance which parent properties need to have to be inherited by this
+            entity. If no `inheritance` is given, no properties will be inherited by the child.
+            This parameter is case-insensitive.
+
+             Note that the behaviour is currently not yet specified when assigning parents to
+            Records, it only works for inheritance of RecordTypes (and Properties).
+
+            For more information, it is recommended to look into the
+            :ref:`data insertion tutorial<tutorial-inheritance-properties>`.
 
         Raises
         ------
@@ -1469,13 +1465,22 @@ class Property(Entity):
 
         Parameters
         ----------
-        parent : Entity or int or str or None, optional
-            The parent entity
-        **kwargs : dict, optional
-            Additional keyword arguments specifying the parent Entity
-            by id or name, and specifying the inheritance level. See
-            :py:meth:`Entity.add_parent` for more information. Note
-            that by default, `inheritance` is set to ``fix``.
+       Parameters
+        ----------
+        parent : Entity or int or str or None
+            The parent entity, either specified by the Entity object
+            itself, or its id or its name. Default is None.
+        id : int
+            Integer id of the parent entity. Ignored if `parent`
+            is not None.
+        name : str
+            Name of the parent entity. Ignored if `parent is not
+            none`.
+        inheritance : str, default: FIX
+            One of ``obligatory``, ``recommended``, ``suggested``, or ``fix``. Specifies the
+            minimum importance which parent properties need to have to be inherited by this
+            entity. If no `inheritance` is given, no properties will be inherited by the child.
+            This parameter is case-insensitive.
 
         See Also
         --------
@@ -1598,11 +1603,22 @@ class RecordType(Entity):
         parent : Entity or int or str or None, optional
             The parent entity, either specified by the Entity object
             itself, or its id or its name. Default is None.
-        **kwargs : dict, optional
-            Additional keyword arguments specifying the parent Entity by id or
-            name, and specifying the inheritance level. See
-            :py:meth:`Entity.add_parent` for more information. Note
-            that by default, `inheritance` is set to ``obligatory``.
+        Parameters
+        ----------
+        parent : Entity or int or str or None
+            The parent entity, either specified by the Entity object
+            itself, or its id or its name. Default is None.
+        id : int
+            Integer id of the parent entity. Ignored if `parent`
+            is not None.
+        name : str
+            Name of the parent entity. Ignored if `parent is not
+            none`.
+        inheritance : str, default OBLIGATORY
+            One of ``obligatory``, ``recommended``, ``suggested``, or ``fix``. Specifies the
+            minimum importance which parent properties need to have to be inherited by this
+            entity. If no `inheritance` is given, no properties will be inherited by the child.
+            This parameter is case-insensitive.
 
         See Also
         --------
-- 
GitLab