Skip to content

Commit

Permalink
docs: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
larkee committed Mar 10, 2021
1 parent 47433e8 commit 6ef588b
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion google/cloud/spanner_v1/batch.py
Expand Up @@ -179,7 +179,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):


def _make_write_pb(table, columns, values):
"""Helper for :meth:`Batch.insert` et aliae.
"""Helper for :meth:`Batch.insert` et al.
:type table: str
:param table: Name of the table to be modified.
Expand Down
12 changes: 6 additions & 6 deletions google/cloud/spanner_v1/database.py
Expand Up @@ -310,7 +310,7 @@ def __ne__(self, other):
def create(self):
"""Create this database within its instance
Inclues any configured schema assigned to :attr:`ddl_statements`.
Includes any configured schema assigned to :attr:`ddl_statements`.
See
https://cloud.google.com/spanner/reference/rpc/google.spanner.admin.database.v1#google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase
Expand Down Expand Up @@ -568,7 +568,7 @@ def run_in_transaction(self, func, *args, **kw):
:returns: The return value of ``func``.
:raises Exception:
reraises any non-ABORT execptions raised by ``func``.
reraises any non-ABORT exceptions raised by ``func``.
"""
# Sanity check: Is there a transaction already running?
# If there is, then raise a red flag. Otherwise, mark that this one
Expand Down Expand Up @@ -895,7 +895,7 @@ def generate_read_batches(
:rtype: iterable of dict
:returns:
mappings of information used peform actual partitioned reads via
mappings of information used perform actual partitioned reads via
:meth:`process_read_batch`.
"""
partitions = self._get_snapshot().partition_read(
Expand Down Expand Up @@ -945,7 +945,7 @@ def generate_query_batches(
Uses the ``PartitionQuery`` API request to start a partitioned
query operation. Returns a list of batch information needed to
peform the actual queries.
perform the actual queries.
:type sql: str
:param sql: SQL query statement
Expand Down Expand Up @@ -985,7 +985,7 @@ def generate_query_batches(
:rtype: iterable of dict
:returns:
mappings of information used peform actual partitioned reads via
mappings of information used perform actual partitioned reads via
:meth:`process_read_batch`.
"""
partitions = self._get_snapshot().partition_query(
Expand Down Expand Up @@ -1065,7 +1065,7 @@ def _check_ddl_statements(value):
https://cloud.google.com/spanner/docs/data-definition-language
:type value: list of string
:param value: DDL statements, excluding the 'CREATE DATABSE' statement
:param value: DDL statements, excluding the 'CREATE DATABASE' statement
:rtype: tuple
:returns: tuple of validated DDL statement strings.
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/spanner_v1/instance.py
Expand Up @@ -349,7 +349,7 @@ def delete(self):
Soon afterward:
* The instance and all databases within the instance will be deleteed.
* The instance and all databases within the instance will be deleted.
All data in the databases will be permanently deleted.
"""
api = self._client.instance_admin_api
Expand All @@ -365,7 +365,7 @@ def database(self, database_id, ddl_statements=(), pool=None, logger=None):
:type ddl_statements: list of string
:param ddl_statements: (Optional) DDL statements, excluding the
'CREATE DATABSE' statement.
'CREATE DATABASE' statement.
:type pool: concrete subclass of
:class:`~google.cloud.spanner_v1.pool.AbstractSessionPool`.
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/spanner_v1/keyset.py
Expand Up @@ -88,7 +88,7 @@ def _to_pb(self):
return KeyRangePB(**kwargs)

def _to_dict(self):
"""Return keyrange's state as a dict.
"""Return the state of the keyrange as a dict.
:rtype: dict
:returns: state of this instance.
Expand Down Expand Up @@ -155,7 +155,7 @@ def _to_pb(self):
return KeySetPB(**kwargs)

def _to_dict(self):
"""Return keyset's state as a dict.
"""Return the state of the keyset as a dict.
The result can be used to serialize the instance and reconstitute
it later using :meth:`_from_dict`.
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/spanner_v1/pool.py
Expand Up @@ -42,7 +42,7 @@ def __init__(self, labels=None):

@property
def labels(self):
"""User-assigned labels for sesions created by the pool.
"""User-assigned labels for sessions created by the pool.
:rtype: dict (str -> str)
:returns: labels assigned by the user
Expand Down Expand Up @@ -162,7 +162,7 @@ def bind(self, database):
"""Associate the pool with a database.
:type database: :class:`~google.cloud.spanner_v1.database.Database`
:param database: database used by the pool: used to create sessions
:param database: database used by the pool to used to create sessions
when needed.
"""
self._database = database
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/spanner_v1/session.py
Expand Up @@ -321,7 +321,7 @@ def run_in_transaction(self, func, *args, **kw):
:returns: The return value of ``func``.
:raises Exception:
reraises any non-ABORT execptions raised by ``func``.
reraises any non-ABORT exceptions raised by ``func``.
"""
deadline = time.time() + kw.pop("timeout_secs", DEFAULT_RETRY_TIMEOUT_SECS)
attempts = 0
Expand Down
8 changes: 4 additions & 4 deletions google/cloud/spanner_v1/snapshot.py
Expand Up @@ -297,7 +297,7 @@ def partition_read(
partition_size_bytes=None,
max_partitions=None,
):
"""Perform a ``ParitionRead`` API request for rows in a table.
"""Perform a ``PartitionRead`` API request for rows in a table.
:type table: str
:param table: name of the table from which to fetch data
Expand Down Expand Up @@ -328,7 +328,7 @@ def partition_read(
:raises ValueError:
for single-use snapshots, or if a transaction ID is
already associtated with the snapshot.
already associated with the snapshot.
"""
if not self._multi_use:
raise ValueError("Cannot use single-use snapshot.")
Expand Down Expand Up @@ -369,7 +369,7 @@ def partition_query(
partition_size_bytes=None,
max_partitions=None,
):
"""Perform a ``ParitionQuery`` API request.
"""Perform a ``PartitionQuery`` API request.
:type sql: str
:param sql: SQL query statement
Expand Down Expand Up @@ -399,7 +399,7 @@ def partition_query(
:raises ValueError:
for single-use snapshots, or if a transaction ID is
already associtated with the snapshot.
already associated with the snapshot.
"""
if not self._multi_use:
raise ValueError("Cannot use single-use snapshot.")
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/spanner_v1/transaction.py
Expand Up @@ -266,7 +266,7 @@ def batch_update(self, statements):
Tuple(status, Sequence[int])
:returns:
Status code, plus counts of rows affected by each completed DML
statement. Note that if the staus code is not ``OK``, the
statement. Note that if the status code is not ``OK``, the
statement triggering the error will not have an entry in the
list, nor will any statements following that one.
"""
Expand Down

0 comments on commit 6ef588b

Please sign in to comment.