diff --git a/source/tools.txt b/source/tools.txt index d3516d83..de6eaa4d 100644 --- a/source/tools.txt +++ b/source/tools.txt @@ -260,6 +260,8 @@ daemon in the global application group: and in the `Multiple Python Sub Interpreters `__ section of the mod_wsgi documentation. +.. _pymongo-tools-type-checkers: + Type Checkers ------------- diff --git a/source/write/bulk-write.txt b/source/write/bulk-write.txt index 7cc8f212..5ed216e1 100644 --- a/source/write/bulk-write.txt +++ b/source/write/bulk-write.txt @@ -366,37 +366,6 @@ The ``MongoClient.bulk_write()`` method returns a ``ClientBulkWriteResult`` obje * - ``upserted_count`` - | The number of documents upserted, if any. -Type Hints ----------- - -.. include:: /includes/type-hints/intro.rst - -When you use the ``bulk_write()`` method to perform an ``InsertOne`` or ``ReplaceOne`` -operation, -The following code example shows how to insert -- ``~pymongo.collection.Collection.bulk_write()`` - -For ``bulk_write()``, both the ``~pymongo.operations.InsertOne()`` and -``~pymongo.operations.ReplaceOne()`` operators are generic. - -The following code example shows that the results are the same as the preceding examples -when you call the ``bulk_write()`` method: - -.. code-block:: python - - from typing import TypedDict - from pymongo import MongoClient - from pymongo.operations import InsertOne - from pymongo.collection import Collection - client: MongoClient = MongoClient() - collection: Collection[Movie] = client.test.test - inserted = collection.bulk_write([InsertOne(Movie(name="Jurassic Park", year=1993))]) - result = collection.find_one({"name": "Jurassic Park"}) - assert result is not None - assert result["year"] == 1993 - -.. include:: /includes/type-hints/tip-more-info.rst - Troubleshooting ---------------