Skip to content

Commit 4dc48d6

Browse files
dvora-hchayimdogukantebermdczaplicki
authored
Implemented COMMAND DOCS by always throwing NotImplementedError (#2020)
* command docs * Add support for AUTH (#1929) * Add support for AUTH * Fix linter error * test fix * fix test in cluster Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: Chayim I. Kirshen <c@kirshen.com> Co-authored-by: dvora-h <dvora.heller@redis.com> * Add support for JSON, TIMESERIES, BLOOM & GRAPH commands in cluster (#2032) Co-authored-by: Chayim <chayim@users.noreply.github.com> * Add support for HSET items (#2006) * Add `items` parameter to `hset` * Add test for `hset` with `items` * Update CHANGES * fix test_profile Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: dvora-h <dvora.heller@redis.com> * Add cluster support for functions (#2016) * cluster support for functions * fix test_list_on_cluster mark * fix mark * cluster unstable url * fix * fix cluster url * skip tests * linters * linters * skip test Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: dogukanteber <47397379+dogukanteber@users.noreply.github.com> Co-authored-by: Chayim I. Kirshen <c@kirshen.com> Co-authored-by: Marek Czaplicki <mdczaplicki@gmail.com>
1 parent c4e4088 commit 4dc48d6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Diff for: redis/commands/core.py

+9
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,15 @@ def command_info(self, **kwargs) -> None:
743743
def command_count(self, **kwargs) -> ResponseT:
744744
return self.execute_command("COMMAND COUNT", **kwargs)
745745

746+
def command_docs(self, *args):
747+
"""
748+
This function throws a NotImplementedError since it is intentionally
749+
not supported.
750+
"""
751+
raise NotImplementedError(
752+
"COMMAND DOCS is intentionally not implemented in the client."
753+
)
754+
746755
def config_get(self, pattern: PatternT = "*", **kwargs) -> ResponseT:
747756
"""
748757
Return a dictionary of configuration based on the ``pattern``

Diff for: tests/test_commands.py

+5
Original file line numberDiff line numberDiff line change
@@ -4239,6 +4239,11 @@ def test_command_count(self, r):
42394239
assert isinstance(res, int)
42404240
assert res >= 100
42414241

4242+
@skip_if_server_version_lt("7.0.0")
4243+
def test_command_docs(self, r):
4244+
with pytest.raises(NotImplementedError):
4245+
r.command_docs("set")
4246+
42424247
@pytest.mark.onlynoncluster
42434248
@skip_if_server_version_lt("2.8.13")
42444249
def test_command_getkeys(self, r):

0 commit comments

Comments
 (0)