Skip to content

Commit

Permalink
Undocument the check keyword argument to DatabaseMapping methods
Browse files Browse the repository at this point in the history
Re #307

It's for internal use only.
We might even rename it to _check in the future?
  • Loading branch information
manuelma committed Nov 21, 2023
1 parent 633ce6d commit 313ad54
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions spinedb_api/db_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ def add_item(self, item_type, check=True, **kwargs):
Args:
item_type (str): One of <spine_item_types>.
check (bool, optional): Whether to carry out integrity checks.
**kwargs: Fields and values as specified for the item type in :ref:`db_mapping_schema`.
Returns:
Expand All @@ -411,7 +410,6 @@ def add_items(self, item_type, *items, check=True, strict=False):
item_type (str): One of <spine_item_types>.
*items (Iterable(dict)): One or more :class:`dict` objects mapping fields to values of the item type,
as specified in :ref:`db_mapping_schema`.
check (bool): Whether or not to run integrity checks.
strict (bool): Whether or not the method should raise :exc:`~.exception.SpineIntegrityError`
if the insertion of one of the items violates an integrity constraint.
Expand Down Expand Up @@ -442,7 +440,6 @@ def update_item(self, item_type, check=True, **kwargs):
Args:
item_type (str): One of <spine_item_types>.
check (bool, optional): Whether to carry out integrity checks.
id (int): The id of the item to update.
**kwargs: Fields to update and their new values as specified for the item type in :ref:`db_mapping_schema`.
Expand All @@ -464,7 +461,6 @@ def update_items(self, item_type, *items, check=True, strict=False):
item_type (str): One of <spine_item_types>.
*items (Iterable(dict)): One or more :class:`dict` objects mapping fields to values of the item type,
as specified in :ref:`db_mapping_schema` and including the `id`.
check (bool): Whether or not to run integrity checks.
strict (bool): Whether or not the method should raise :exc:`~.exception.SpineIntegrityError`
if the update of one of the items violates an integrity constraint.
Expand Down Expand Up @@ -494,7 +490,6 @@ def remove_item(self, item_type, id_, check=True):
Args:
item_type (str): One of <spine_item_types>.
id_ (int): The id of the item to remove.
check (bool, optional): Whether to carry out integrity checks.
Returns:
tuple(:class:`PublicItem` or None, str): The removed item and any errors.
Expand All @@ -512,7 +507,6 @@ def remove_items(self, item_type, *ids, check=True, strict=False):
Args:
item_type (str): One of <spine_item_types>.
*ids (Iterable(int)): Ids of items to be removed.
check (bool): Whether or not to run integrity checks.
strict (bool): Whether or not the method should raise :exc:`~.exception.SpineIntegrityError`
if the update of one of the items violates an integrity constraint.
Expand Down Expand Up @@ -848,7 +842,6 @@ def add_{item_type}_item(self, check=True, **kwargs):
"""Adds {a} `{item_type}` item to the in-memory mapping.
Args:
check (bool, optional): Whether to carry out integrity checks.
{add_kwargs}
Returns:
Expand All @@ -868,7 +861,6 @@ def update_{item_type}_item(self, check=True, **kwargs):
"""Updates {a} `{item_type}` item in the in-memory mapping.
Args:
check (bool, optional): Whether to carry out integrity checks.
{update_kwargs}
Returns:
Expand Down

0 comments on commit 313ad54

Please sign in to comment.