Skip to content

Commit 7a7ffa6

Browse files
PYTHON-5111 Update datetime_conversion in docstrings of MongoClients (#2135)
1 parent c6ffa1e commit 7a7ffa6

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ documentation including narrative docs, and the [Sphinx docstring format](https:
178178
You can build the documentation locally by running:
179179

180180
```bash
181-
just docs-build
181+
just docs
182182
```
183183

184184
When updating docs, it can be helpful to run the live docs server as:

pymongo/asynchronous/mongo_client.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,17 +276,16 @@ def __init__(
276276
:param type_registry: instance of
277277
:class:`~bson.codec_options.TypeRegistry` to enable encoding
278278
and decoding of custom types.
279-
:param datetime_conversion: Specifies how UTC datetimes should be decoded
279+
:param kwargs: **Additional optional parameters available as keyword arguments:**
280+
281+
- `datetime_conversion` (optional): Specifies how UTC datetimes should be decoded
280282
within BSON. Valid options include 'datetime_ms' to return as a
281283
DatetimeMS, 'datetime' to return as a datetime.datetime and
282284
raising a ValueError for out-of-range values, 'datetime_auto' to
283285
return DatetimeMS objects when the underlying datetime is
284286
out-of-range and 'datetime_clamp' to clamp to the minimum and
285287
maximum possible datetimes. Defaults to 'datetime'. See
286288
:ref:`handling-out-of-range-datetimes` for details.
287-
288-
| **Other optional parameters can be passed as keyword arguments:**
289-
290289
- `directConnection` (optional): if ``True``, forces this client to
291290
connect directly to the specified MongoDB host as a standalone.
292291
If ``false``, the client connects to the entire replica set of

pymongo/synchronous/mongo_client.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,17 +274,16 @@ def __init__(
274274
:param type_registry: instance of
275275
:class:`~bson.codec_options.TypeRegistry` to enable encoding
276276
and decoding of custom types.
277-
:param datetime_conversion: Specifies how UTC datetimes should be decoded
277+
:param kwargs: **Additional optional parameters available as keyword arguments:**
278+
279+
- `datetime_conversion` (optional): Specifies how UTC datetimes should be decoded
278280
within BSON. Valid options include 'datetime_ms' to return as a
279281
DatetimeMS, 'datetime' to return as a datetime.datetime and
280282
raising a ValueError for out-of-range values, 'datetime_auto' to
281283
return DatetimeMS objects when the underlying datetime is
282284
out-of-range and 'datetime_clamp' to clamp to the minimum and
283285
maximum possible datetimes. Defaults to 'datetime'. See
284286
:ref:`handling-out-of-range-datetimes` for details.
285-
286-
| **Other optional parameters can be passed as keyword arguments:**
287-
288287
- `directConnection` (optional): if ``True``, forces this client to
289288
connect directly to the specified MongoDB host as a standalone.
290289
If ``false``, the client connects to the entire replica set of

0 commit comments

Comments
 (0)