Skip to content

Commit 782c551

Browse files
authored
PYTHON-3146 Test Failure - Could not import extension sphinxcontrib.shellcheck (#889)
1 parent 0672d2d commit 782c551

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

doc/conf.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,18 @@
2121
"sphinx.ext.coverage",
2222
"sphinx.ext.todo",
2323
"sphinx.ext.intersphinx",
24-
"sphinxcontrib.shellcheck",
2524
]
2625

26+
27+
# Add optional extensions
28+
try:
29+
import sphinxcontrib.shellcheck # noqa
30+
31+
extensions += ["sphinxcontrib.shellcheck"]
32+
except ImportError:
33+
pass
34+
35+
2736
# Add any paths that contain templates here, relative to this directory.
2837
templates_path = ["_templates"]
2938

doc/examples/bulk.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ and fourth operations succeed.
145145
'index': 0,...
146146
'op': {'_id': 1}},
147147
{'code': 11000,
148-
'errmsg': '...E11000...duplicate key error...',
148+
'errmsg': '...',
149149
'index': 2,...
150150
'op': {'_id': 3}}]}
151151

doc/examples/geo.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ insert a couple of example locations:
3636
>>> result = db.places.insert_many([{"loc": [2, 5]},
3737
... {"loc": [30, 5]},
3838
... {"loc": [1, 2]},
39-
... {"loc": [4, 4]}]) # doctest: +ELLIPSIS
39+
... {"loc": [4, 4]}])
4040
>>> result.inserted_ids
4141
[ObjectId('...'), ObjectId('...'), ObjectId('...'), ObjectId('...')]
4242

doc/faq.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,7 @@ collection, configured to use :class:`~bson.son.SON` instead of dict:
264264
>>> from bson import CodecOptions, SON
265265
>>> opts = CodecOptions(document_class=SON)
266266
>>> opts
267-
CodecOptions(document_class=<class 'bson.son.SON'>,
268-
tz_aware=False,
269-
uuid_representation=UuidRepresentation.UNSPECIFIED,
270-
unicode_decode_error_handler='strict',
271-
tzinfo=None, type_registry=TypeRegistry(type_codecs=[],
272-
fallback_encoder=None))
267+
CodecOptions(document_class=...SON..., tz_aware=False, uuid_representation=UuidRepresentation.UNSPECIFIED, unicode_decode_error_handler='strict', tzinfo=None, type_registry=TypeRegistry(type_codecs=[], fallback_encoder=None))
273268
>>> collection_son = collection.with_options(codec_options=opts)
274269

275270
Now, documents and subdocuments in query results are represented with

0 commit comments

Comments
 (0)