CP review
This commit is contained in:
parent
284dfa28bb
commit
2bf2502fb6
@ -251,7 +251,6 @@ class AsyncCollection(common.BaseObject, Generic[_DocumentType]):
|
||||
unicode_decode_error_handler="replace", document_class=dict
|
||||
)
|
||||
self._timeout = database.client.options.timeout
|
||||
self._retry_policy = database.client._retry_policy
|
||||
|
||||
if create or kwargs:
|
||||
if _IS_SYNC:
|
||||
|
||||
@ -135,7 +135,6 @@ class AsyncDatabase(common.BaseObject, Generic[_DocumentType]):
|
||||
self._name = name
|
||||
self._client: AsyncMongoClient[_DocumentType] = client
|
||||
self._timeout = client.options.timeout
|
||||
self._retry_policy = client._retry_policy
|
||||
|
||||
@property
|
||||
def client(self) -> AsyncMongoClient[_DocumentType]:
|
||||
|
||||
@ -254,7 +254,6 @@ class Collection(common.BaseObject, Generic[_DocumentType]):
|
||||
unicode_decode_error_handler="replace", document_class=dict
|
||||
)
|
||||
self._timeout = database.client.options.timeout
|
||||
self._retry_policy = database.client._retry_policy
|
||||
|
||||
if create or kwargs:
|
||||
if _IS_SYNC:
|
||||
|
||||
@ -135,7 +135,6 @@ class Database(common.BaseObject, Generic[_DocumentType]):
|
||||
self._name = name
|
||||
self._client: MongoClient[_DocumentType] = client
|
||||
self._timeout = client.options.timeout
|
||||
self._retry_policy = client._retry_policy
|
||||
|
||||
@property
|
||||
def client(self) -> MongoClient[_DocumentType]:
|
||||
|
||||
@ -37,7 +37,7 @@ from pymongo.errors import OperationFailure, PyMongoError
|
||||
|
||||
_IS_SYNC = False
|
||||
|
||||
# Mock an system overload error.
|
||||
# Mock a system overload error.
|
||||
mock_overload_error = {
|
||||
"configureFailPoint": "failCommand",
|
||||
"mode": {"times": 1},
|
||||
|
||||
@ -37,7 +37,7 @@ from pymongo.errors import OperationFailure, PyMongoError
|
||||
|
||||
_IS_SYNC = True
|
||||
|
||||
# Mock an system overload error.
|
||||
# Mock a system overload error.
|
||||
mock_overload_error = {
|
||||
"configureFailPoint": "failCommand",
|
||||
"mode": {"times": 1},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user