Skip to content

Commit 8b16940

Browse files
jsorefMikhail Koviazin
authored andcommitted
fix spelling in the repo
Signed-off-by: Josh Soref <[email protected]>
1 parent d9ff3ff commit 8b16940

30 files changed

+96
-99
lines changed

.github/spellcheck-settings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
matrix:
22
- name: Markdown
33
expect_match: false
4-
apsell:
4+
aspell:
55
lang: en
66
d: en_US
77
ignore-case: true

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Alternatively, you might want to look at [Async connections](https://valkey-py.r
8383

8484
### Valkey Commands
8585

86-
There is built-in support for all of the [out-of-the-box Valkey commands](https://valkey.io/commands). They are exposed using the raw Redis command names (`HSET`, `HGETALL`, etc.) except where a word (i.e. del) is reserved by the language. The complete set of commands can be found [here](https://github.com/valkey-io/valkey-py/tree/main/valkey/commands), or [the documentation](https://valkey-py.readthedocs.io/en/latest/commands.html).
86+
There is built-in support for all of the [out-of-the-box Valkey commands](https://valkey.io/commands). They are exposed using the raw Redis command names (`HSET`, `HGETALL`, etc.) except where a word (i.e. del) is reserved by the language. See the [complete set of commands](https://github.com/valkey-io/valkey-py/tree/main/valkey/commands), or [the documentation](https://valkey-py.readthedocs.io/en/latest/commands.html).
8787

8888
## Documentation
8989

@@ -142,8 +142,7 @@ The following example shows how to utilize [Valkey Pub/Sub](https://valkey.io/to
142142

143143
### Author
144144

145-
valkey-py can be found [here](
146-
https://github.com/valkey-io/valkey-py), or downloaded from [pypi](https://pypi.org/project/valkey/).
145+
You can read valkey-py sources on [GitHub](https://github.com/valkey-io/valkey-py), or download it from [pypi](https://pypi.org/project/valkey/)
147146
It was created as a fork of [redis-py](https://github.com/redis/redis-py)
148147

149148
Special thanks to:

tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def cluster_tests(c, uvloop=False, protocol=2, color=False):
7474
)
7575
else:
7676
run(
77-
f"pytest --color={'yes' if color else 'no'} --protocol={protocol} --cov=./ --cov-report=xml:coverage_clusteclient.xml -W always -m 'not onlynoncluster and not valkeymod' --valkey-url={cluster_url} --junit-xml=cluster-results.xml"
77+
f"pytest --color={'yes' if color else 'no'} --protocol={protocol} --cov=./ --cov-report=xml:coverage_clusterclient.xml -W always -m 'not onlynoncluster and not valkeymod' --valkey-url={cluster_url} --junit-xml=cluster-results.xml"
7878
)
7979

8080

tests/conftest.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,7 @@ def pytest_sessionstart(session):
167167

168168
uvloop.install()
169169
except ImportError as e:
170-
raise RuntimeError(
171-
"Can not import uvloop, make sure it is installed"
172-
) from e
170+
raise RuntimeError("Cannot import uvloop, make sure it is installed") from e
173171

174172

175173
def wait_for_cluster_creation(valkey_url, cluster_nodes, timeout=60):
@@ -510,7 +508,7 @@ def assert_resp_response(r, response, resp2_expected, resp3_expected):
510508
def assert_geo_is_close(coords, expected_coords):
511509
"""Verifies that the coordinates are close within the floating point tolerance.
512510
513-
Valkey uses 52-bit presicion
511+
Valkey uses 52-bit precision
514512
"""
515513
for a, b in zip(coords, expected_coords):
516514
assert math.isclose(a, b)

tests/mocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
class MockSocket:
55
"""
6-
A class simulating an readable socket, optionally raising a
6+
A class simulating a readable socket, optionally raising a
77
special exception every other read.
88
"""
99

tests/test_asyncio/test_cluster.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ async def test_all_nodes(self, r: ValkeyCluster) -> None:
775775

776776
async def test_all_nodes_masters(self, r: ValkeyCluster) -> None:
777777
"""
778-
Set a list of nodes with random primaries/replicas config and it shold
778+
Set a list of nodes with random primaries/replicas config and it should
779779
be possible to iterate over all of them.
780780
"""
781781
nodes = [
@@ -1128,7 +1128,7 @@ async def test_cluster_failover(self, r: ValkeyCluster) -> None:
11281128
assert await r.cluster_failover(node, "FORCE") is True
11291129
assert await r.cluster_failover(node, "TAKEOVER") is True
11301130
with pytest.raises(ValkeyError):
1131-
await r.cluster_failover(node, "FORCT")
1131+
await r.cluster_failover(node, "NONEXISTENT_KEY")
11321132

11331133
async def test_cluster_info(self, r: ValkeyCluster) -> None:
11341134
info = await r.cluster_info()
@@ -2446,7 +2446,7 @@ async def test_init_slots_cache(self) -> None:
24462446

24472447
async def test_init_slots_cache_cluster_mode_disabled(self) -> None:
24482448
"""
2449-
Test that creating a ValkeyCluster failes if one of the startup nodes
2449+
Test that creating a ValkeyCluster fails if one of the startup nodes
24502450
has cluster mode disabled
24512451
"""
24522452
with pytest.raises(ValkeyClusterException) as e:
@@ -2469,7 +2469,7 @@ async def test_empty_startup_nodes(self) -> None:
24692469

24702470
async def test_wrong_startup_nodes_type(self) -> None:
24712471
"""
2472-
If something other then a list type itteratable is provided it should
2472+
If something other then a list type iterable is provided it should
24732473
fail
24742474
"""
24752475
with pytest.raises(ValkeyClusterException):

tests/test_asyncio/test_commands.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ def factory(username):
6262
async def slowlog(r: valkey.Valkey):
6363
current_config = await r.config_get()
6464
old_slower_than_value = current_config["slowlog-log-slower-than"]
65-
old_max_legnth_value = current_config["slowlog-max-len"]
65+
old_max_length_value = current_config["slowlog-max-len"]
6666

6767
await r.config_set("slowlog-log-slower-than", 0)
6868
await r.config_set("slowlog-max-len", 128)
6969

7070
yield
7171

7272
await r.config_set("slowlog-log-slower-than", old_slower_than_value)
73-
await r.config_set("slowlog-max-len", old_max_legnth_value)
73+
await r.config_set("slowlog-max-len", old_max_length_value)
7474

7575

7676
async def valkey_server_time(client: valkey.Valkey):
@@ -1972,10 +1972,10 @@ async def test_zunionstore_max(self, r: valkey.Valkey):
19721972
await r.zadd("b", {"a1": 2, "a2": 2, "a3": 2})
19731973
await r.zadd("c", {"a1": 6, "a3": 5, "a4": 4})
19741974
assert await r.zunionstore("d", ["a", "b", "c"], aggregate="MAX") == 4
1975-
respponse = await r.zrange("d", 0, -1, withscores=True)
1975+
response = await r.zrange("d", 0, -1, withscores=True)
19761976
assert_resp_response(
19771977
r,
1978-
respponse,
1978+
response,
19791979
[(b"a2", 2.0), (b"a4", 4.0), (b"a3", 5.0), (b"a1", 6.0)],
19801980
[[b"a2", 2.0], [b"a4", 4.0], [b"a3", 5.0], [b"a1", 6.0]],
19811981
)
@@ -2647,7 +2647,7 @@ async def test_geosearch_with(
26472647

26482648
@skip_if_server_version_lt("6.2.0")
26492649
async def test_geosearch_negative(self, r: valkey.Valkey):
2650-
# not specifying member nor longitude and latitude
2650+
# neither specifying member nor longitude and latitude
26512651
with pytest.raises(exceptions.DataError):
26522652
assert await r.geosearch("barcelona")
26532653
# specifying member and longitude and latitude
@@ -2661,7 +2661,7 @@ async def test_geosearch_negative(self, r: valkey.Valkey):
26612661
with pytest.raises(exceptions.DataError):
26622662
assert await r.geosearch("barcelona", latitude=2)
26632663

2664-
# not specifying radius nor width and height
2664+
# neither specifying radius nor width and height
26652665
with pytest.raises(exceptions.DataError):
26662666
assert await r.geosearch("barcelona", member="Paris")
26672667
# specifying radius and width and height
@@ -3549,8 +3549,8 @@ async def helper():
35493549
with pytest.raises(asyncio.CancelledError):
35503550
# blocking pop
35513551
ready.set()
3552-
await r.brpop(["nonexist"])
3553-
# If the following is not done, further Timout operations will fail,
3552+
await r.brpop(["nonexistent"])
3553+
# If the following is not done, further Timeout operations will fail,
35543554
# because the timeout won't catch its Cancelled Error if the task
35553555
# has a pending cancel. Python documentation probably should reflect this.
35563556
if sys.version_info >= (3, 11):

tests/test_asyncio/test_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ async def test_connection_parse_response_resume(r: valkey.Valkey):
212212
[_AsyncRESP2Parser, _AsyncRESP3Parser, _AsyncLibvalkeyParser],
213213
ids=["AsyncRESP2Parser", "AsyncRESP3Parser", "AsyncLibvalkeyParser"],
214214
)
215-
async def test_connection_disconect_race(parser_class, connect_args):
215+
async def test_connection_disconnect_race(parser_class, connect_args):
216216
"""
217217
This test reproduces the case in issue #2349
218218
where a connection is closed while the parser is reading to feed the

tests/test_asyncio/test_cwe_404.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ async def op(r):
134134
await t
135135

136136
# make sure that our previous request, cancelled while waiting for
137-
# a repsponse, didn't leave the connection open andin a bad state
137+
# a response, didn't leave the connection open and in a bad state
138138
assert await r.get("bar") == b"bar"
139139
assert await r.ping()
140140
assert await r.get("foo") == b"foo"
@@ -173,7 +173,7 @@ async def op(pipe):
173173
with pytest.raises(asyncio.CancelledError):
174174
await t
175175

176-
# we have now cancelled the pieline in the middle of a request,
176+
# we have now cancelled the pipeline in the middle of a request,
177177
# make sure that the connection is still usable
178178
pipe.get("bar")
179179
pipe.ping()

tests/test_asyncio/test_json.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async def test_json_merge(decoded_r: valkey.Valkey):
5858
"person1": {"personal_data": {"name": "John", "hobbies": "reading"}}
5959
}
6060

61-
# Test with root path path $.person1.personal_data
61+
# Test with root path $.person1.personal_data
6262
assert await decoded_r.json().merge(
6363
"person_data", "$.person1.personal_data", {"country": "Israel"}
6464
)
@@ -89,7 +89,7 @@ async def test_jsonsetexistentialmodifiersshouldsucceed(decoded_r: valkey.Valkey
8989
assert await decoded_r.json().set("obj", Path("foo"), "baz", xx=True)
9090
assert await decoded_r.json().set("obj", Path("qaz"), "baz", nx=True)
9191

92-
# Test that flags are mutually exlusive
92+
# Test that flags are mutually exclusive
9393
with pytest.raises(Exception):
9494
await decoded_r.json().set("obj", Path("foo"), "baz", nx=True, xx=True)
9595

@@ -825,7 +825,7 @@ async def test_objkeys_dollar(decoded_r: valkey.Valkey):
825825
# Test missing key
826826
assert await decoded_r.json().objkeys("non_existing_doc", "..a") is None
827827

828-
# Test non existing doc
828+
# Test nonexistent doc
829829
with pytest.raises(exceptions.ResponseError):
830830
assert await decoded_r.json().objkeys("non_existing_doc", "$..a") == []
831831

0 commit comments

Comments
 (0)