Skip to content

Commit 65246f6

Browse files
committed
MongoClients docstring change: Moved datetime_conversion to kwarg and cleaned up formatting of last param
1 parent 1b81847 commit 65246f6

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

pymongo/asynchronous/mongo_client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,17 +276,18 @@ 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: ...
280+
281+
| **Other optional parameters can be passed as keyword arguments:**
282+
283+
- `datetime_conversion` (optional): Specifies how UTC datetimes should be decoded
280284
within BSON. Valid options include 'datetime_ms' to return as a
281285
DatetimeMS, 'datetime' to return as a datetime.datetime and
282286
raising a ValueError for out-of-range values, 'datetime_auto' to
283287
return DatetimeMS objects when the underlying datetime is
284288
out-of-range and 'datetime_clamp' to clamp to the minimum and
285289
maximum possible datetimes. Defaults to 'datetime'. See
286290
:ref:`handling-out-of-range-datetimes` for details.
287-
288-
| **Other optional parameters can be passed as keyword arguments:**
289-
290291
- `directConnection` (optional): if ``True``, forces this client to
291292
connect directly to the specified MongoDB host as a standalone.
292293
If ``false``, the client connects to the entire replica set of

pymongo/synchronous/mongo_client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,17 +274,18 @@ 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: ...
278+
279+
| **Other optional parameters can be passed as keyword arguments:**
280+
281+
- `datetime_conversion` (optional): Specifies how UTC datetimes should be decoded
278282
within BSON. Valid options include 'datetime_ms' to return as a
279283
DatetimeMS, 'datetime' to return as a datetime.datetime and
280284
raising a ValueError for out-of-range values, 'datetime_auto' to
281285
return DatetimeMS objects when the underlying datetime is
282286
out-of-range and 'datetime_clamp' to clamp to the minimum and
283287
maximum possible datetimes. Defaults to 'datetime'. See
284288
:ref:`handling-out-of-range-datetimes` for details.
285-
286-
| **Other optional parameters can be passed as keyword arguments:**
287-
288289
- `directConnection` (optional): if ``True``, forces this client to
289290
connect directly to the specified MongoDB host as a standalone.
290291
If ``false``, the client connects to the entire replica set of

0 commit comments

Comments
 (0)