Skip to content

Commit 06b76ee

Browse files
authored
fix: address comments
1 parent 7eaa046 commit 06b76ee

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

arango/collection.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,15 +1992,16 @@ def import_bulk(
19921992
IMPORTANT NOTE: this parameter may go through breaking changes
19931993
in the future where the return type may not be a list of result
19941994
objects anymore. Use it at your own risk, and avoid
1995-
depending on the return value if possible. Should not be used
1996-
if **overwrite** is set to true.
1995+
depending on the return value if possible. Cannot be used with
1996+
parameter **overwrite**.
19971997
:type batch_size: int
19981998
:return: Result of the bulk import.
19991999
:rtype: dict | list[dict]
20002000
:raise arango.exceptions.DocumentInsertError: If import fails.
20012001
"""
2002-
if overwrite and batch_size:
2003-
raise ValueError("Cannot set **batch_size** if **overwrite** is true")
2002+
if overwrite and batch_size is not None:
2003+
msg = "Cannot use parameter 'batch_size' if 'overwrite' is set to True"
2004+
raise ValueError(msg)
20042005

20052006
documents = [self._ensure_key_from_id(doc) for doc in documents]
20062007

0 commit comments

Comments
 (0)