Skip to content

Commit

Permalink
chore: fix docstring typos (found via codespell) (googleapis#724)
Browse files Browse the repository at this point in the history
```
codespell --version
2.1.0
```
  • Loading branch information
schwehr authored Sep 27, 2021
1 parent 10df8ba commit e7f3ff9
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions google/cloud/ndb/_eventloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def run_idle(self):
"""Run one of the idle callbacks.
Returns:
bool: Indicates if an idle calback was called.
bool: Indicates if an idle callback was called.
"""
if not self.idlers or self.inactive >= len(self.idlers):
return False
Expand All @@ -270,7 +270,7 @@ def _run_current(self):
"""Run one current item.
Returns:
bool: Indicates if an idle calback was called.
bool: Indicates if an idle callback was called.
"""
if not self.current:
return False
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/ndb/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class _ContextIds:
sufficient to uniquely identify the context in which a particular piece of code is
being run. Each context, as it is created, is assigned the next id in this sequence.
The context id is used by `utils.logging_debug` to grant insight into where a debug
logging statement is coming from in a cloud evironment.
logging statement is coming from in a cloud environment.
"""

def __init__(self):
Expand Down Expand Up @@ -138,7 +138,7 @@ def get_toplevel_context(raise_context_error=True):
The toplevel context is the context created by the call to
:meth:`google.cloud.ndb.client.Client.context`. At times, this context will
be superceded by subcontexts, which are used, for example, during
be superseded by subcontexts, which are used, for example, during
transactions. This function will always return the top level context
regardless of whether one of these subcontexts is the current one.
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/ndb/global_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def set_if_not_exists(self, items, expires=None):
Returns:
Dict[bytes, bool]: A `dict` mapping to boolean value wich will be
Dict[bytes, bool]: A `dict` mapping to boolean value that will be
:data:`True` if that key was set with a new value, and :data:`False`
otherwise.
"""
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/ndb/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6156,7 +6156,7 @@ def _code_name_from_stored_name(cls, name):
# class SomeKind(ndb.Model):
# foo = ndb.IntegerProperty(name="bar")
#
# If we are passed "bar", we know to translate that to "foo", becasue
# If we are passed "bar", we know to translate that to "foo", because
# the datastore property, "bar", is the NDB property, "foo". But if we
# are passed "foo", here, then that must be the datastore property,
# "foo", which isn't even mapped to anything in the NDB model.
Expand Down
16 changes: 8 additions & 8 deletions tests/system/test_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -1484,9 +1484,9 @@ class SomeKind(ndb.Model):
key = entity.put()
dispose_of(key._key)

retreived = key.get()
assert retreived.user.email() == "[email protected]"
assert retreived.user.auth_domain() == "gmail.com"
retrieved = key.get()
assert retrieved.user.email() == "[email protected]"
assert retrieved.user.auth_domain() == "gmail.com"


@pytest.mark.usefixtures("client_context")
Expand All @@ -1508,9 +1508,9 @@ def user_id(self):
key = entity.put()
dispose_of(key._key)

retreived = key.get()
assert retreived.user.email() == "[email protected]"
assert retreived.user.auth_domain() == "gmail.com"
retrieved = key.get()
assert retrieved.user.email() == "[email protected]"
assert retrieved.user.auth_domain() == "gmail.com"


@pytest.mark.usefixtures("client_context")
Expand All @@ -1527,8 +1527,8 @@ class SomeKind(ndb.Model):
key = entity.put()
dispose_of(key._key)

retreived = key.get()
assert retreived.foo == ["", ""]
retrieved = key.get()
assert retrieved.foo == ["", ""]


@pytest.mark.skipif(not USE_REDIS_CACHE, reason="Redis is not configured")
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/orchestrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def hither_and_yon(destination):
class _Conductor:
"""Coordinate communication between main thread and a test thread.
Two way communicaton is maintained between the main thread and a test thread using
Two way communication is maintained between the main thread and a test thread using
two synchronized queues (`queue.Queue`) each with a size of one.
"""

Expand Down

0 comments on commit e7f3ff9

Please sign in to comment.