Skip to content

Commit

Permalink
Remove None from param types and add (Optional).
Browse files Browse the repository at this point in the history
This runs a script to remove None from the types for parameters, and
added (Optional) to the description. Does not pass lint due to some
too-long lines. I will clean those up manually.

See:
googleapis/google-cloud-python#2580 (review)
  • Loading branch information
tswast committed Oct 21, 2016
1 parent 2327934 commit a0a9b54
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions google/cloud/datastore/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,8 @@ def commit(self, project, request, transaction_id):
:type request: :class:`._generated.datastore_pb2.CommitRequest`
:param request: The protobuf with the mutations being committed.
:type transaction_id: str or None
:param transaction_id: The transaction ID returned from
:type transaction_id: str
:param transaction_id: (Optional) The transaction ID returned from
:meth:`begin_transaction`. Non-transactional
batches must pass ``None``.
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/datastore/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ def _validate_project(project, parent):
:type project: str
:param project: A project.
:type parent: :class:`google.cloud.datastore.key.Key` or ``NoneType``
:param parent: The parent of the key or ``None``.
:type parent: :class:`google.cloud.datastore.key.Key`
:param parent: (Optional) The parent of the key or ``None``.
:rtype: str
:returns: The ``project`` passed in, or implied from the environment.
Expand Down
12 changes: 6 additions & 6 deletions google/cloud/datastore/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ class Query(object):
:param project: The project associated with the query. If not passed,
uses the client's value.
:type namespace: str or None
:param namespace: The namespace to which to restrict results. If not
:type namespace: str
:param namespace: (Optional) The namespace to which to restrict results. If not
passed, uses the client's value.
:type ancestor: :class:`google.cloud.datastore.key.Key` or None
:param ancestor: key of the ancestor to which this query's results are
:type ancestor: :class:`google.cloud.datastore.key.Key`
:param ancestor: (Optional) key of the ancestor to which this query's results are
restricted.
:type filters: sequence of (property_name, operator, value) tuples
Expand Down Expand Up @@ -327,8 +327,8 @@ def fetch(self, limit=None, offset=0, start_cursor=None, end_cursor=None,
>>> list(query.fetch(1))
[<Entity object>]
:type limit: int or None
:param limit: An optional limit passed through to the iterator.
:type limit: int
:param limit: (Optional) An optional limit passed through to the iterator.
:type offset: int
:param offset: An optional offset passed through to the iterator.
Expand Down

0 comments on commit a0a9b54

Please sign in to comment.