Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spelling fixes. #209

Merged
merged 2 commits into from
Sep 24, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion google/cloud/ndb/_datastore_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ class _AllocateIdsBatch:
"""Batch for AllocateIds requests.

Not related to batch used by transactions to allocate ids for upserts
before comitting, although they do both eventually call
before committing, although they do both eventually call
``_datastore_allocate_ids``.

Args:
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/ndb/_datastore_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def has_next_async(self):
raise tasklets.Return(False)

# If sorting, peek at the next values from all result sets and take
# the mininum.
# the minimum.
if self._sortable:
min_index, min_value = 0, result_sets[0]._peek()
for i, result_set in enumerate(result_sets[1:], 1):
Expand Down
10 changes: 5 additions & 5 deletions google/cloud/ndb/_eventloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class EventLoop:
to think of it as running tasks "on demand". Generally, when some piece of
code needs a result from a future, the future's
:meth:`~tasklets.Future.wait` method will end up calling
:meth:`~EventLoop.run1`, which will attempt to excecute a single task that
:meth:`~EventLoop.run1`, which will attempt to execute a single task that
is queued in the loop. The future will continue to call
:meth:`~EventLoop.run1` until one of the callbacks ultimately puts that
future into it's ``done`` state, either by setting the result or setting an
Expand All @@ -81,7 +81,7 @@ class EventLoop:
other futures were waiting on those results and results derived from those
results.

Currently, these are the seperate queues used by the event loop in the
Currently, these are the separate queues used by the event loop in the
order they are checked by :meth:`~EventLoop.run1`. For each call to
:meth:`~EventLoop.run1`, the first thing it finds is called:

Expand Down Expand Up @@ -112,11 +112,11 @@ class EventLoop:
:method:`~EventLoop.run1` might block. If the only thing to do is
wait for a gRPC call to finish, we may as well wait.

Atrributes:
Attributes:
current (deque): a FIFO list of (callback, args, kwds). These callbacks
run immediately when the eventloop runs. Used by tasklets to
schedule calls to :meth:`tasklets.TaskletFuture._advance_tasklet`.
idlers (deque): a FIFO list of (callback, args, kwds). Thes callbacks
idlers (deque): a FIFO list of (callback, args, kwds). These callbacks
run only when no other RPCs need to be fired first. Used for
batching calls to the Datastore back end.
inactive (int): Number of consecutive idlers that were noops. Reset
Expand All @@ -127,7 +127,7 @@ class EventLoop:
time. Used by :func:`tasklets.sleep`.
rpcs (dict): a map from RPC to callback. Callback is called when the
RPC finishes.
rpc_results (queue.Queue): A syncrhonized queue used to coordinate with
rpc_results (queue.Queue): A synchronized queue used to coordinate with
gRPC. As gRPC futures that we're waiting on are finished, they will
get added to this queue and then processed by the event loop.
"""
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/ndb/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def get_global_cache_policy(self):
"""
return self.global_cache_policy

get_memcache_policy = get_global_cache_policy # backwards compatability
get_memcache_policy = get_global_cache_policy # backwards compatibility

def get_global_cache_timeout_policy(self):
"""Return the current policy function global cache timeout (expiration).
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/ndb/tasklets.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def done_callback(yielded):
#
# It was tempting to call `_advance_tasklet` (`_help_tasklet_along`
# in Legacy) directly. Doing so, it has been found, can lead to
# exceeding the maximum recursion depth. Queing it up to run on the
# exceeding the maximum recursion depth. Queuing it up to run on the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correction made the line length go over 79 characters, which is not accepted by the lint checker. Please move the last word here to the following line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in e239dc9

# event loop avoids this issue by keeping the call stack shallow.
self.waiting_on = None

Expand Down
2 changes: 1 addition & 1 deletion test_utils/scripts/get_target_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def get_changed_packages(file_list):
if os.path.isdir(abs_file) and os.path.isfile(nox_file):
all_packages.add(file_)

# If ther is no file list, send down the full package set.
# If there is no file list, send down the full package set.
if file_list is None:
return all_packages

Expand Down
2 changes: 1 addition & 1 deletion test_utils/test_utils/scripts/get_target_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def get_changed_packages(file_list):
if os.path.isdir(abs_file) and os.path.isfile(nox_file):
all_packages.add(file_)

# If ther is no file list, send down the full package set.
# If there is no file list, send down the full package set.
if file_list is None:
return all_packages

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2217,7 +2217,7 @@ def test_read_from_entity_bad_meaning(self):
with pytest.raises(ValueError):
model.User.read_from_entity(entity, name)

# Wrong assocated value.
# Wrong associated value.
entity._meanings[name] = (model._MEANING_PREDEFINED_ENTITY_USER, None)
with pytest.raises(ValueError):
model.User.read_from_entity(entity, name)
Expand Down