Skip to content

Commit e503de8

Browse files
authored
chore: fix docstring typos (found via codespell) (#724)
``` codespell --version 2.1.0 ```
1 parent 0b7ab2c commit e503de8

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

packages/google-cloud-ndb/google/cloud/ndb/_eventloop.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def run_idle(self):
246246
"""Run one of the idle callbacks.
247247
248248
Returns:
249-
bool: Indicates if an idle calback was called.
249+
bool: Indicates if an idle callback was called.
250250
"""
251251
if not self.idlers or self.inactive >= len(self.idlers):
252252
return False
@@ -270,7 +270,7 @@ def _run_current(self):
270270
"""Run one current item.
271271
272272
Returns:
273-
bool: Indicates if an idle calback was called.
273+
bool: Indicates if an idle callback was called.
274274
"""
275275
if not self.current:
276276
return False

packages/google-cloud-ndb/google/cloud/ndb/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class _ContextIds:
4040
sufficient to uniquely identify the context in which a particular piece of code is
4141
being run. Each context, as it is created, is assigned the next id in this sequence.
4242
The context id is used by `utils.logging_debug` to grant insight into where a debug
43-
logging statement is coming from in a cloud evironment.
43+
logging statement is coming from in a cloud environment.
4444
"""
4545

4646
def __init__(self):
@@ -138,7 +138,7 @@ def get_toplevel_context(raise_context_error=True):
138138
139139
The toplevel context is the context created by the call to
140140
:meth:`google.cloud.ndb.client.Client.context`. At times, this context will
141-
be superceded by subcontexts, which are used, for example, during
141+
be superseded by subcontexts, which are used, for example, during
142142
transactions. This function will always return the top level context
143143
regardless of whether one of these subcontexts is the current one.
144144

packages/google-cloud-ndb/google/cloud/ndb/global_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def set_if_not_exists(self, items, expires=None):
125125
126126
127127
Returns:
128-
Dict[bytes, bool]: A `dict` mapping to boolean value wich will be
128+
Dict[bytes, bool]: A `dict` mapping to boolean value that will be
129129
:data:`True` if that key was set with a new value, and :data:`False`
130130
otherwise.
131131
"""

packages/google-cloud-ndb/google/cloud/ndb/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6156,7 +6156,7 @@ def _code_name_from_stored_name(cls, name):
61566156
# class SomeKind(ndb.Model):
61576157
# foo = ndb.IntegerProperty(name="bar")
61586158
#
6159-
# If we are passed "bar", we know to translate that to "foo", becasue
6159+
# If we are passed "bar", we know to translate that to "foo", because
61606160
# the datastore property, "bar", is the NDB property, "foo". But if we
61616161
# are passed "foo", here, then that must be the datastore property,
61626162
# "foo", which isn't even mapped to anything in the NDB model.

packages/google-cloud-ndb/tests/system/test_crud.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,9 +1484,9 @@ class SomeKind(ndb.Model):
14841484
key = entity.put()
14851485
dispose_of(key._key)
14861486

1487-
retreived = key.get()
1488-
assert retreived.user.email() == "somebody@example.com"
1489-
assert retreived.user.auth_domain() == "gmail.com"
1487+
retrieved = key.get()
1488+
assert retrieved.user.email() == "somebody@example.com"
1489+
assert retrieved.user.auth_domain() == "gmail.com"
14901490

14911491

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

1511-
retreived = key.get()
1512-
assert retreived.user.email() == "somebody@example.com"
1513-
assert retreived.user.auth_domain() == "gmail.com"
1511+
retrieved = key.get()
1512+
assert retrieved.user.email() == "somebody@example.com"
1513+
assert retrieved.user.auth_domain() == "gmail.com"
15141514

15151515

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

1530-
retreived = key.get()
1531-
assert retreived.foo == ["", ""]
1530+
retrieved = key.get()
1531+
assert retrieved.foo == ["", ""]
15321532

15331533

15341534
@pytest.mark.skipif(not USE_REDIS_CACHE, reason="Redis is not configured")

packages/google-cloud-ndb/tests/unit/orchestrate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def hither_and_yon(destination):
219219
class _Conductor:
220220
"""Coordinate communication between main thread and a test thread.
221221
222-
Two way communicaton is maintained between the main thread and a test thread using
222+
Two way communication is maintained between the main thread and a test thread using
223223
two synchronized queues (`queue.Queue`) each with a size of one.
224224
"""
225225

0 commit comments

Comments
 (0)