diff --git a/google/cloud/ndb/_datastore_api.py b/google/cloud/ndb/_datastore_api.py index 5c866e50..1ebca996 100644 --- a/google/cloud/ndb/_datastore_api.py +++ b/google/cloud/ndb/_datastore_api.py @@ -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: diff --git a/google/cloud/ndb/_datastore_query.py b/google/cloud/ndb/_datastore_query.py index 34d67c43..1ef4d28b 100644 --- a/google/cloud/ndb/_datastore_query.py +++ b/google/cloud/ndb/_datastore_query.py @@ -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): diff --git a/google/cloud/ndb/_eventloop.py b/google/cloud/ndb/_eventloop.py index f3e62ee2..8eef719a 100644 --- a/google/cloud/ndb/_eventloop.py +++ b/google/cloud/ndb/_eventloop.py @@ -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 @@ -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: @@ -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 @@ -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. """ diff --git a/google/cloud/ndb/context.py b/google/cloud/ndb/context.py index 54fa80e9..edcd7cea 100644 --- a/google/cloud/ndb/context.py +++ b/google/cloud/ndb/context.py @@ -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). diff --git a/google/cloud/ndb/tasklets.py b/google/cloud/ndb/tasklets.py index 5bea3d83..e3e0eb81 100644 --- a/google/cloud/ndb/tasklets.py +++ b/google/cloud/ndb/tasklets.py @@ -330,8 +330,9 @@ 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 - # event loop avoids this issue by keeping the call stack shallow. + # exceeding the maximum recursion depth. Queuing it up to run on + # the event loop avoids this issue by keeping the call stack + # shallow. self.waiting_on = None error = yielded.exception() diff --git a/test_utils/scripts/get_target_packages.py b/test_utils/scripts/get_target_packages.py index 1d51830c..6a1cad7c 100644 --- a/test_utils/scripts/get_target_packages.py +++ b/test_utils/scripts/get_target_packages.py @@ -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 diff --git a/test_utils/test_utils/scripts/get_target_packages.py b/test_utils/test_utils/scripts/get_target_packages.py index 1d51830c..6a1cad7c 100644 --- a/test_utils/test_utils/scripts/get_target_packages.py +++ b/test_utils/test_utils/scripts/get_target_packages.py @@ -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 diff --git a/tests/unit/test_model.py b/tests/unit/test_model.py index 0a697d8a..8f216478 100644 --- a/tests/unit/test_model.py +++ b/tests/unit/test_model.py @@ -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)