CP review

This commit is contained in:
Noah Stapp 2026-04-13 13:08:05 -04:00
parent 284dfa28bb
commit 2bf2502fb6
6 changed files with 2 additions and 6 deletions

View File

@ -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:

View File

@ -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]:

View File

@ -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:

View File

@ -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]:

View File

@ -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},

View File

@ -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},