Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions redis/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,13 +760,15 @@ def command_docs(self, *args):
"COMMAND DOCS is intentionally not implemented in the client."
)

def config_get(self, pattern: PatternT = "*", **kwargs) -> ResponseT:
def config_get(
self, pattern: PatternT = "*", *args: List[PatternT], **kwargs
) -> ResponseT:
"""
Return a dictionary of configuration based on the ``pattern``

For more information see https://redis.io/commands/config-get
"""
return self.execute_command("CONFIG GET", pattern, **kwargs)
return self.execute_command("CONFIG GET", pattern, *args, **kwargs)

def config_set(self, name: KeyT, value: EncodableT, **kwargs) -> ResponseT:
"""Set config item ``name`` with ``value``
Expand Down
6 changes: 6 additions & 0 deletions tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,12 @@ def test_config_get(self, r):
# # assert 'maxmemory' in data
# assert data['maxmemory'].isdigit()

@skip_if_server_version_lt("7.0.0")
def test_config_get_multi_params(self, r: redis.Redis):
res = r.config_get("*max-*-entries*", "maxmemory")
assert "maxmemory" in res
assert "hash-max-listpack-entries" in res

@pytest.mark.onlynoncluster
@skip_if_redis_enterprise()
def test_config_resetstat(self, r):
Expand Down