File tree Expand file tree Collapse file tree 4 files changed +4
-8
lines changed Expand file tree Collapse file tree 4 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -231,9 +231,7 @@ def __init__(
231
231
from pymongo .asynchronous .database import AsyncDatabase
232
232
233
233
if not isinstance (database , AsyncDatabase ):
234
- raise TypeError (
235
- f"AsyncCollection requires an AsyncDatabase, { database } is an instance of { type (database )} "
236
- )
234
+ raise TypeError (f"AsyncCollection requires an AsyncDatabase but { type (database )} given" )
237
235
238
236
if not name or ".." in name :
239
237
raise InvalidName ("collection names cannot be empty" )
Original file line number Diff line number Diff line change @@ -686,7 +686,7 @@ async def create_encrypted_collection(
686
686
"""
687
687
if not isinstance (database , AsyncDatabase ):
688
688
raise TypeError (
689
- f"create_encrypted_collection() requires an AsyncDatabase, but { database } is an instance of { type (database )} "
689
+ f"create_encrypted_collection() requires an AsyncDatabase but { type (database )} given "
690
690
)
691
691
692
692
encrypted_fields = deepcopy (encrypted_fields )
Original file line number Diff line number Diff line change @@ -234,9 +234,7 @@ def __init__(
234
234
from pymongo .synchronous .database import Database
235
235
236
236
if not isinstance (database , Database ):
237
- raise TypeError (
238
- f"Collection requires a Database, { database } is an instance of { type (database )} "
239
- )
237
+ raise TypeError (f"Collection requires a Database but { type (database )} given" )
240
238
241
239
if not name or ".." in name :
242
240
raise InvalidName ("collection names cannot be empty" )
Original file line number Diff line number Diff line change @@ -684,7 +684,7 @@ def create_encrypted_collection(
684
684
"""
685
685
if not isinstance (database , Database ):
686
686
raise TypeError (
687
- f"create_encrypted_collection() requires a Database, but { database } is an instance of { type (database )} "
687
+ f"create_encrypted_collection() requires a Database but { type (database )} given "
688
688
)
689
689
690
690
encrypted_fields = deepcopy (encrypted_fields )
You can’t perform that action at this time.
0 commit comments