Skip to content

Commit

Permalink
Fixing Batch class docstring (referenced dead code).
Browse files Browse the repository at this point in the history
Also adding Dataset class as a documented import in the
datastore package __init__.

Fixes #709.
  • Loading branch information
dhermes committed Mar 12, 2015
1 parent 19bdb13 commit bbd049b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions gcloud/datastore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
which represents a connection between your machine and the Cloud Datastore
API.
- :class:`gcloud.datastore.dataset.Dataset`
which represents a dataset ID (string) bundled with a connection and has
convenience methods for constructing objects with that dataset ID.
- :class:`gcloud.datastore.entity.Entity`
which represents a single entity in the datastore
(akin to a row in relational database world).
Expand Down Expand Up @@ -56,6 +60,7 @@
from gcloud.datastore.api import put
from gcloud.datastore.batch import Batch
from gcloud.datastore.connection import Connection
from gcloud.datastore.dataset import Dataset
from gcloud.datastore.entity import Entity
from gcloud.datastore.key import Key
from gcloud.datastore.query import Query
Expand Down
2 changes: 0 additions & 2 deletions gcloud/datastore/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ class Batch(object):
By default, no updates will be sent if the block exits with an error::
>>> from gcloud import datastore
>>> dataset = datastore.get_dataset('dataset-id')
>>> with Batch() as batch:
... do_some_work(batch)
... raise Exception() # rolls back
Expand Down

0 comments on commit bbd049b

Please sign in to comment.