Skip to content

Commit b97ce73

Browse files
committed
Merge pull request #175 from dhermes/move-todos-to-issue-tracker
Move todos to issue tracker
2 parents a6fa3f6 + 3ee6231 commit b97ce73

File tree

13 files changed

+4
-46
lines changed

13 files changed

+4
-46
lines changed

gcloud/datastore/connection.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,6 @@ def save_entity(self, dataset_id, key_pb, properties):
322322
:type properties: dict
323323
:param properties: The properties to store on the entity.
324324
"""
325-
# TODO: Is this the right method name?
326-
# TODO: How do you delete properties? Set them to None?
327325
mutation = self.mutation()
328326

329327
# If the Key is complete, we should upsert
@@ -381,13 +379,10 @@ def delete_entities(self, dataset_id, key_pbs):
381379
delete = mutation.delete.add()
382380
delete.CopyFrom(key_pb)
383381

384-
# TODO: Make this return value be a True/False (or something more useful).
385382
if self.transaction():
386383
return True
387384
else:
388385
return self.commit(dataset_id, mutation)
389386

390387
def delete_entity(self, dataset_id, key_pb):
391-
# TODO: Is this the right way to handle deleting
392-
# (single and multiple as separate methods)?
393388
return self.delete_entities(dataset_id, [key_pb])

gcloud/datastore/entity.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ def reload(self):
166166
# Note that you must have a valid key, otherwise this makes no sense.
167167
entity = self.dataset().get_entity(self.key().to_protobuf())
168168

169-
# TODO(jjg): Raise an error if something dumb happens.
170169
if entity:
171170
self.update(entity)
172171
return self
@@ -207,7 +206,6 @@ def delete(self):
207206
dataset_id=self.dataset().id(), key_pb=self.key().to_protobuf())
208207

209208
def __repr__(self): #pragma NO COVER
210-
# TODO: Make sure that this makes sense.
211209
# An entity should have a key all the time (even if it's partial).
212210
if self.key():
213211
return '<Entity%s %s>' % (self.key().path(), super(Entity, self).__repr__())

gcloud/datastore/helpers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,4 @@ def get_value_from_protobuf(pb):
9797
return pb.value.string_value
9898

9999
else:
100-
# TODO(jjg): Should we raise a ValueError here?
101100
return None

gcloud/datastore/key.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77

88
class Key(object):
9-
# TODO: Determine if this really should be immutable.
109
"""
1110
An immutable representation of a datastore Key.
1211
"""

gcloud/datastore/query.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from gcloud.datastore.key import Key
77

88

9-
# TODO: Figure out how to properly handle namespaces.
10-
119
class Query(object):
1210
"""A Query against the Cloud Datastore.
1311
@@ -60,7 +58,6 @@ def __init__(self, kind=None, dataset=None):
6058
self._pb.kind.add().name = kind
6159

6260
def _clone(self):
63-
# TODO(jjg): Double check that this makes sense...
6461
clone = copy.deepcopy(self)
6562
clone._dataset = self._dataset # Shallow copy the dataset.
6663
return clone
@@ -216,8 +213,6 @@ def kind(self, *kinds):
216213
If a kind is provided, returns a clone of the :class:`Query`
217214
with those kinds set.
218215
"""
219-
# TODO: Do we want this to be additive?
220-
# If not, clear the _pb.kind attribute.
221216
if kinds:
222217
clone = self._clone()
223218
for kind in kinds:

gcloud/storage/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
__version__ = '0.1'
3333

34-
# TODO: Allow specific scopes and authorization levels.
3534
SCOPE = ('https://www.googleapis.com/auth/devstorage.full_control',
3635
'https://www.googleapis.com/auth/devstorage.read_only',
3736
'https://www.googleapis.com/auth/devstorage.read_write')

gcloud/storage/acl.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ def __init__(self, type, identifier=None):
101101
is optional.
102102
"""
103103

104-
# TODO: Add validation of types.
105104
self.identifier = identifier
106105
self.roles = set([])
107106
self.type = type

gcloud/storage/bucket.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,9 @@ def delete(self, force=False):
149149
150150
:raises: :class:`gcloud.storage.exceptions.NotFoundError`
151151
"""
152-
153-
# TODO: Make sure the proper exceptions are raised.
154-
155152
return self.connection.delete_bucket(self.name, force=force)
156153

157154
def delete_key(self, key):
158-
# TODO: Should we accept a 'silent' param here to not raise an exception?
159155
"""Deletes a key from the current bucket.
160156
161157
If the key isn't found,
@@ -189,7 +185,6 @@ def delete_key(self, key):
189185
return key
190186

191187
def delete_keys(self, keys):
192-
# TODO: What should be the return value here?
193188
# NOTE: boto returns a MultiDeleteResult instance.
194189
for key in keys:
195190
self.delete_key(key)
@@ -198,7 +193,6 @@ def copy_key(self): #pragma NO COVER
198193
raise NotImplementedError
199194

200195
def upload_file(self, filename, key=None):
201-
# TODO: What do we do about overwriting data?
202196
"""Shortcut method to upload a file into this bucket.
203197
204198
Use this method to quickly put a local file in Cloud Storage.
@@ -392,7 +386,6 @@ def reload_acl(self):
392386
return self
393387

394388
def get_acl(self):
395-
# TODO: This might be a VERY long list. Use the specific API endpoint.
396389
"""Get ACL metadata as a :class:`gcloud.storage.acl.BucketACL` object.
397390
398391
:rtype: :class:`gcloud.storage.acl.BucketACL`

gcloud/storage/connection.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,12 @@ def api_request(self, method, path=None, query_params=None,
217217
response, content = self.make_request(
218218
method=method, url=url, data=data, content_type=content_type)
219219

220-
# TODO: Add better error handling.
221220
if response.status == 404:
222221
raise exceptions.NotFoundError(response, content)
223222
elif not 200 <= response.status < 300:
224223
raise exceptions.ConnectionError(response, content)
225224

226225
if content and expect_json:
227-
# TODO: Better checking on this header for JSON.
228226
content_type = response.get('content-type', '')
229227
if not content_type.startswith('application/json'):
230228
raise TypeError('Expected JSON, got %s' % content_type)
@@ -282,8 +280,6 @@ def get_bucket(self, bucket_name, *args, **kwargs):
282280
:returns: The bucket matching the name provided.
283281
:raises: :class:`gcloud.storage.exceptions.NotFoundError`
284282
"""
285-
286-
# TODO: URL-encode the bucket name to be safe?
287283
bucket = self.new_bucket(bucket_name)
288284
response = self.api_request(method='GET', path=bucket.path)
289285
return Bucket.from_dict(response, connection=self)
@@ -317,7 +313,6 @@ def lookup(self, bucket_name):
317313
return None
318314

319315
def create_bucket(self, bucket, *args, **kwargs):
320-
# TODO: Which exceptions will this raise?
321316
"""Create a new bucket.
322317
323318
For example::

gcloud/storage/exceptions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# TODO: Make these super useful.
2-
31
class StorageError(Exception):
42
pass
53

0 commit comments

Comments
 (0)