Skip to content

Commit cbbf745

Browse files
committed
NS feedback
1 parent 84dc281 commit cbbf745

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/data-formats/dates-and-times.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ the one in the sample document. Select the :guilabel:`Synchronous` or
164164
from datetime import datetime
165165

166166
collection = database["sample_collection"]
167-
find_result = await (collection.find_one())["date"]
167+
find_result = (await collection.find_one())["date"]
168168
print(f"datetime: {find_result}")
169169
print(f"datetime.tzinfo: {find_result.tzinfo}")
170170

@@ -230,7 +230,7 @@ to see the corresponding code:
230230

231231
options = CodecOptions(tz_aware = True)
232232
collection = database.get_collection("sample_collection", options)
233-
find_result = await (collection.find_one())["date"]
233+
find_result = (await collection.find_one())["date"]
234234

235235
print(f"datetime: {find_result}")
236236
print(f"datetime.tzinfo: {find_result.tzinfo}")
@@ -311,7 +311,7 @@ or :guilabel:`Asynchronous` tab to see the corresponding code:
311311
options = CodecOptions(tz_aware = True, tzinfo = pacific)
312312
collection = database.get_collection("sample_collection", options)
313313

314-
find_result = await (collection.find_one())["date"]
314+
find_result = (await collection.find_one())["date"]
315315
print(f"datetime: {find_result}")
316316
print(f"datetime.tzinfo: {find_result.tzinfo}")
317317

@@ -395,7 +395,7 @@ corresponding code:
395395

396396
print(f"datetime before storage: {local_datetime}")
397397
await collection.insert_one({"date": local_datetime})
398-
find_result = await (collection.find_one())["date"]
398+
find_result = (await collection.find_one())["date"]
399399
print(f"datetime after storage: {find_result}")
400400

401401
.. output::
@@ -684,7 +684,7 @@ filter out document values outside of the range supported by
684684

685685
from datetime import datetime
686686
coll = client.test.dates
687-
cur = await coll.find({'dt': {'$gte': datetime.min, '$lte': datetime.max}})
687+
cur = coll.find({'dt': {'$gte': datetime.min, '$lte': datetime.max}})
688688

689689
If you don't need the value of ``datetime``, you can filter out just that field. Select the
690690
:guilabel:`Synchronous` or :guilabel:`Asynchronous` tab to see the corresponding code:
@@ -703,7 +703,7 @@ If you don't need the value of ``datetime``, you can filter out just that field.
703703

704704
.. code-block:: python
705705

706-
cur = await coll.find({}, projection={'dt': False})
706+
cur = coll.find({}, projection={'dt': False})
707707

708708
API Documentation
709709
-----------------

0 commit comments

Comments
 (0)