From 612cc18192b4b3c13a41ab7c5885b51bff38334a Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Mon, 13 Sep 2021 22:06:56 +1000 Subject: [PATCH] docs: Fix a few typos There are small typos in: - pymemcache/client/base.py - pymemcache/test/test_client.py - pymemcache/test/test_client_retry.py Fixes: - Should read `setting` rather than `settting`. - Should read `collection` rather than `collectino`. - Should read `serializer` rather than `seralizer`. - Should read `interaction` rather than `interacction`. --- pymemcache/client/base.py | 2 +- pymemcache/test/test_client.py | 4 ++-- pymemcache/test/test_client_retry.py | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pymemcache/client/base.py b/pymemcache/client/base.py index 89359476..82abb4f2 100644 --- a/pymemcache/client/base.py +++ b/pymemcache/client/base.py @@ -289,7 +289,7 @@ def __init__(self, Args: server: tuple(hostname, port) or string containing a UNIX socket path. - serde: optional seralizer object, see notes in the class docs. + serde: optional serializer object, see notes in the class docs. serializer: deprecated serialization function deserializer: deprecated deserialization function connect_timeout: optional float, seconds to wait for a connection to diff --git a/pymemcache/test/test_client.py b/pymemcache/test/test_client.py index 1d445f24..7afa0562 100644 --- a/pymemcache/test/test_client.py +++ b/pymemcache/test/test_client.py @@ -188,7 +188,7 @@ def _extract_value(self, expect_cas, line, buf, remapped_keys, class ClientTestMixin: def make_client(self, mock_socket_values, **kwargs): client = Client(None, **kwargs) - # mock out client._connect() rather than hard-settting client.sock to + # mock out client._connect() rather than hard-setting client.sock to # ensure methods are checking whether self.sock is None before # attempting to use it sock = MockSocket(list(mock_socket_values)) @@ -198,7 +198,7 @@ def make_client(self, mock_socket_values, **kwargs): def make_customized_client(self, mock_socket_values, **kwargs): client = CustomizedClient(None, **kwargs) - # mock out client._connect() rather than hard-settting client.sock to + # mock out client._connect() rather than hard-setting client.sock to # ensure methods are checking whether self.sock is None before # attempting to use it sock = MockSocket(list(mock_socket_values)) diff --git a/pymemcache/test/test_client_retry.py b/pymemcache/test/test_client_retry.py index de64a467..2a82ea18 100644 --- a/pymemcache/test/test_client_retry.py +++ b/pymemcache/test/test_client_retry.py @@ -17,7 +17,7 @@ class TestRetryingClientPassthrough(ClientTestMixin, unittest.TestCase): def make_base_client(self, mock_socket_values, **kwargs): base_client = Client(None, **kwargs) - # mock out client._connect() rather than hard-settting client.sock to + # mock out client._connect() rather than hard-setting client.sock to # ensure methods are checking whether self.sock is None before # attempting to use it sock = MockSocket(list(mock_socket_values)) @@ -43,7 +43,7 @@ class TestRetryingClient(object): def make_base_client(self, mock_socket_values, **kwargs): """ Creates a regular mock client to wrap in the RetryClient. """ base_client = Client(None, **kwargs) - # mock out client._connect() rather than hard-settting client.sock to + # mock out client._connect() rather than hard-setting client.sock to # ensure methods are checking whether self.sock is None before # attempting to use it sock = MockSocket(list(mock_socket_values)) @@ -104,7 +104,7 @@ def test_constructor_retry_for(self): with pytest.raises(ValueError): RetryingClient(base_client, retry_for="haha!") - # With collectino of string and exceptions? + # With collection of string and exceptions? with pytest.raises(ValueError): RetryingClient(base_client, retry_for=[Exception, str]) @@ -131,7 +131,7 @@ def test_constructor_do_no_retry_for(self): with pytest.raises(ValueError): RetryingClient(base_client, do_not_retry_for="haha!") - # With collectino of string and exceptions? + # With collection of string and exceptions? with pytest.raises(ValueError): RetryingClient(base_client, do_not_retry_for=[Exception, str]) @@ -294,7 +294,7 @@ def test_do_not_retry_for_exception_fail(self): client.get("key") def test_both_exception_filters(self): - # Test interacction between both exception filters. + # Test interaction between both exception filters. client = self.make_client( [ MemcacheClientError("Whoops."),