diff --git a/pymongo/asynchronous/command_cursor.py b/pymongo/asynchronous/command_cursor.py index fb85755362..a06b501fa6 100644 --- a/pymongo/asynchronous/command_cursor.py +++ b/pymongo/asynchronous/command_cursor.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""CommandCursor class to iterate over command results.""" +"""AsyncCommandCursor class to iterate over command results.""" from __future__ import annotations @@ -42,7 +42,18 @@ class AsyncCommandCursor(_AsyncCursorBase[_DocumentType]): - """An asynchronous cursor / iterator over command cursors.""" + """An asynchronous cursor / iterator over command cursors. + Used by :meth:`~pymongo.asynchronous.collection.AsyncCollection.aggregate`, + :meth:`~pymongo.asynchronous.database.AsyncDatabase.aggregate`, + :meth:`~pymongo.asynchronous.collection.AsyncCollection.list_indexes`, + :meth:`~pymongo.asynchronous.collection.AsyncCollection.list_search_indexes` + :meth:`~pymongo.asynchronous.database.AsyncDatabase.list_collections`, + :meth:`~pymongo.asynchronous.database.AsyncDatabase.cursor_command`, + and :meth:`~pymongo.asynchronous.mongo_client.AsyncMongoClient.list_databases` + to iterate MongoDB command results. + + Should not be called directly by application developers. + """ _getmore_class = _GetMore diff --git a/pymongo/asynchronous/cursor.py b/pymongo/asynchronous/cursor.py index 4a4fdf43ff..0b2b09f742 100644 --- a/pymongo/asynchronous/cursor.py +++ b/pymongo/asynchronous/cursor.py @@ -97,9 +97,9 @@ def __init__( let: Optional[bool] = None, ) -> None: """Create a new cursor. + Used by :meth:`~pymongo.asynchronous.collection.AsyncCollection.find` to iterate over MongoDB query results. - Should not be called directly by application developers - see - :meth:`~pymongo.asynchronous.collection.AsyncCollection.find` instead. + Should not be called directly by application developers. .. seealso:: The MongoDB documentation on `cursors `_. """ diff --git a/pymongo/synchronous/command_cursor.py b/pymongo/synchronous/command_cursor.py index 82a9732bd9..1e7f26064d 100644 --- a/pymongo/synchronous/command_cursor.py +++ b/pymongo/synchronous/command_cursor.py @@ -42,7 +42,18 @@ class CommandCursor(_CursorBase[_DocumentType]): - """A cursor / iterator over command cursors.""" + """A cursor / iterator over command cursors. + Used by :meth:`~pymongo.collection.Collection.aggregate`, + :meth:`~pymongo.database.Database.aggregate`, + :meth:`~pymongo.collection.Collection.list_indexes`, + :meth:`~pymongo.collection.Collection.list_search_indexes` + :meth:`~pymongo.database.Database.list_collections`, + :meth:`~pymongo.database.Database.cursor_command`, + and :meth:`~pymongo.mongo_client.MongoClient.list_databases` + to iterate MongoDB command results. + + Should not be called directly by application developers. + """ _getmore_class = _GetMore diff --git a/pymongo/synchronous/cursor.py b/pymongo/synchronous/cursor.py index e1fdf2af0e..dd0fafdf3a 100644 --- a/pymongo/synchronous/cursor.py +++ b/pymongo/synchronous/cursor.py @@ -97,9 +97,9 @@ def __init__( let: Optional[bool] = None, ) -> None: """Create a new cursor. + Used by :meth:`~pymongo.collection.Collection.find` to iterate over MongoDB query results. - Should not be called directly by application developers - see - :meth:`~pymongo.collection.Collection.find` instead. + Should not be called directly by application developers. .. seealso:: The MongoDB documentation on `cursors `_. """