Skip to content

Commit f423c07

Browse files
committed
Fix a few documentation issues.
1 parent 6e35b8a commit f423c07

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

bson/json_util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ def loads(s, *args, **kwargs):
131131
Automatically passes the object_hook for BSON type conversion.
132132
133133
:Parameters:
134-
- `compile_re` (optional): if ``False``, don't attempt to compile
135-
BSON regular expressions into Python regular expressions. Return
136-
instances of :class:`~bson.bsonregex.BSONRegex` instead.
134+
- `compile_re` (optional): if ``False``, don't attempt to compile BSON
135+
regular expressions into Python regular expressions. Return instances
136+
of :class:`~bson.bsonregex.BSONRegex` instead.
137137
138138
.. versionchanged:: 2.7
139139
Added ``compile_re`` option.

doc/tools.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ MotorEngine
8383
`MotorEngine <http://motorengine.readthedocs.org/>`_ is a port of
8484
MongoEngine to Motor, for asynchronous access with Tornado.
8585
It implements the same modeling APIs to be data-portable, meaning that a
86-
model defined in MongoEngine can be read in MotorEngine. The source `is on
87-
github <http://github.com/heynemann/motorengine>`_.
86+
model defined in MongoEngine can be read in MotorEngine. The source is
87+
`available on github <http://github.com/heynemann/motorengine>`_.
8888

8989
Framework Tools
9090
---------------

gridfs/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def put(self, data, **kwargs):
105105
try:
106106
f = new_file(**kwargs)
107107
f.write(data)
108-
finally
108+
finally:
109109
f.close()
110110
111111
`data` can be either an instance of :class:`str` (:class:`bytes`
@@ -284,18 +284,18 @@ def find(self, *args, **kwargs):
284284
285285
Returns a cursor that iterates across files matching
286286
arbitrary queries on the files collection. Can be combined
287-
with other modifiers for additional control. For example
287+
with other modifiers for additional control. For example::
288288
289-
>>> for grid_out in fs.find({"filename": "lisa.txt"}, timeout=False):
290-
>>> data = grid_out.read()
289+
for grid_out in fs.find({"filename": "lisa.txt"}, timeout=False):
290+
data = grid_out.read()
291291
292292
would iterate through all versions of "lisa.txt" stored in GridFS.
293293
Note that setting timeout to False may be important to prevent the
294294
cursor from timing out during long multi-file processing work.
295295
296-
As another example, the call
296+
As another example, the call::
297297
298-
>>> most_recent_three = fs.find().sort("uploadDate", -1).limit(3)
298+
most_recent_three = fs.find().sort("uploadDate", -1).limit(3)
299299
300300
would return a cursor to the three most recently uploaded files
301301
in GridFS.

0 commit comments

Comments
 (0)