GridFSBucket docs whitespace fixes.

This commit is contained in:
A. Jesse Jiryu Davis 2016-10-30 18:16:51 -04:00
parent e82aa77168
commit cdb40fb747

View File

@ -590,7 +590,7 @@ class GridFSBucket(object):
Raises :exc:`~gridfs.errors.NoFile` if no file with file_id exists.
:Parameters:
-`file_id`: The _id of the file to be downloaded.
- `file_id`: The _id of the file to be downloaded.
"""
gout = GridOut(self._collection, file_id)
@ -616,8 +616,8 @@ class GridFSBucket(object):
Raises :exc:`~gridfs.errors.NoFile` if no file with file_id exists.
:Parameters:
-`file_id`: The _id of the file to be downloaded.
-`destination`: a file-like object implementing :meth:`write`.
- `file_id`: The _id of the file to be downloaded.
- `destination`: a file-like object implementing :meth:`write`.
"""
gout = self.open_download_stream(file_id)
for chunk in gout:
@ -632,13 +632,13 @@ class GridFSBucket(object):
my_db = MongoClient().test
fs = GridFSBucket(my_db)
# Get _id of file to delete
file_id = fs.upload_from_stream("test_file", "data I want to store!")
file_id = fs.upload_from_stream("test_file", "data I want to store!")
fs.delete(file_id)
Raises :exc:`~gridfs.errors.NoFile` if no file with file_id exists.
:Parameters:
-`file_id`: The _id of the file to be deleted.
- `file_id`: The _id of the file to be deleted.
"""
res = self._files.delete_one({"_id": file_id})
self._chunks.delete_many({"files_id": file_id})