diff --git a/redis/commands/core.py b/redis/commands/core.py index db48b46f7c..83b97d781b 100644 --- a/redis/commands/core.py +++ b/redis/commands/core.py @@ -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`` diff --git a/tests/test_commands.py b/tests/test_commands.py index f83bb7996d..57182fc3de 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -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):