Skip to content

Commit 686d770

Browse files
authored
refactor(python): fix spelling (#761)
Signed-off-by: John Bampton <[email protected]>
1 parent c5ab988 commit 686d770

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

kazoo/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def __init__(
144144
Should be a dict of SASL options passed to the underlying
145145
`pure-sasl <https://pypi.org/project/pure-sasl>`_ library.
146146
147-
For example using the DIGEST-MD5 mechnism:
147+
For example using the DIGEST-MD5 mechanism:
148148
149149
.. code-block:: python
150150
@@ -1606,7 +1606,7 @@ def reconfig(self, joining, leaving, new_members, from_config=-1):
16061606
16071607
:exc:`~kazoo.exceptions.NewConfigNoQuorumError` if no quorum of new
16081608
config is connected and up-to-date with the leader of last
1609-
commmitted config - try invoking reconfiguration after new servers
1609+
committed config - try invoking reconfiguration after new servers
16101610
are connected and synced.
16111611
16121612
:exc:`~kazoo.exceptions.ReconfigInProcessError` if another

kazoo/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class UnknownSessionError(ZookeeperError):
128128
@_zookeeper_exception(-13)
129129
class NewConfigNoQuorumError(ZookeeperError):
130130
"""No quorum of new config is connected and up-to-date with the leader of
131-
last commmitted config - try invoking reconfiguration after new servers are
131+
last committed config - try invoking reconfiguration after new servers are
132132
connected and synced.
133133
"""
134134

kazoo/protocol/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ def _authenticate_with_sasl(self, host, timeout):
797797
host=host, **self.sasl_options
798798
)
799799

800-
# Inititalize the process with an empty challenge token
800+
# Initialize the process with an empty challenge token
801801
challenge = None
802802
xid = 0
803803

kazoo/recipe/lock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def acquire(self, blocking=True, timeout=None, ephemeral=True):
171171
retry.deadline = timeout
172172

173173
# Ensure we are locked so that we avoid multiple threads in
174-
# this acquistion routine at the same time...
174+
# this acquisition routine at the same time...
175175
method_locked = self._acquire_method_lock.acquire(
176176
blocking=blocking, timeout=timeout if timeout is not None else -1
177177
)

kazoo/testing/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def debug(sig, frame):
4949
d.update(frame.f_locals)
5050

5151
i = code.InteractiveConsole(d)
52-
message = "Signal recieved : entering python shell.\nTraceback:\n"
52+
message = "Signal received : entering python shell.\nTraceback:\n"
5353
message += "".join(traceback.format_stack(frame))
5454
i.interact(message)
5555

kazoo/tests/test_eventlet_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def test_huge_file_descriptor(self):
141141
try:
142142
resource.setrlimit(resource.RLIMIT_NOFILE, (4096, 4096))
143143
except (ValueError, resource.error):
144-
self.skipTest("couldnt raise fd limit high enough")
144+
self.skipTest("couldn't raise fd limit high enough")
145145
fd = 0
146146
socks = []
147147
while fd < 4000:

kazoo/tests/test_gevent_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def test_huge_file_descriptor(self):
153153
try:
154154
resource.setrlimit(resource.RLIMIT_NOFILE, (4096, 4096))
155155
except (ValueError, resource.error):
156-
self.skipTest("couldnt raise fd limit high enough")
156+
self.skipTest("couldn't raise fd limit high enough")
157157
fd = 0
158158
socks = []
159159
while fd < 4000:

kazoo/tests/test_retry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ def test_maximum_delay():
6060
retry = _make_retry(delay=10, max_tries=100, max_jitter=0)
6161
func = _make_try_func(times=2)
6262
retry(func)
63-
assert func.call_count == 3, "Called 3 times, 2 failed _attemps"
63+
assert func.call_count == 3, "Called 3 times, 2 failed _attempts"
6464
assert retry._cur_delay == 10 * 2**2, "Normal exponential backoff"
6565
retry.reset()
6666
func = _make_try_func(times=10)
6767
retry(func)
68-
assert func.call_count == 11, "Called 11 times, 10 failed _attemps"
69-
assert retry._cur_delay == 60, "Delay capped by maximun"
68+
assert func.call_count == 11, "Called 11 times, 10 failed _attempts"
69+
assert retry._cur_delay == 60, "Delay capped by maximum"
7070
# gevent's sleep function is picky about the type
7171
assert isinstance(retry._cur_delay, float)
7272

kazoo/tests/test_threading_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_huge_file_descriptor(self):
5555
try:
5656
resource.setrlimit(resource.RLIMIT_NOFILE, (4096, 4096))
5757
except (ValueError, resource.error):
58-
self.skipTest("couldnt raise fd limit high enough")
58+
self.skipTest("couldn't raise fd limit high enough")
5959
fd = 0
6060
socks = []
6161
while fd < 4000:
@@ -106,7 +106,7 @@ def test_set_exception(self):
106106
mock_handler.completion_queue = Mock()
107107
async_result = self._makeOne(mock_handler)
108108
async_result.rawlink(lambda a: a)
109-
async_result.set_exception(ImportError("Error occured"))
109+
async_result.set_exception(ImportError("Error occurred"))
110110

111111
assert isinstance(async_result.exception, ImportError)
112112
assert mock_handler.completion_queue.put.called

0 commit comments

Comments
 (0)