Repository: redis/redis-py
File: redis/commands/sentinel.py (Python)

Code before:

    def sentinel_monitor(self, name, ip, port, quorum):
        """Add a new master to Sentinel to be monitored"""
        return self.execute_command("SENTINEL MONITOR", name, ip, port, quorum)

    def sentinel_remove(self, name):
        """Remove a master from Sentinel's monitoring"""
        return self.execute_command("SENTINEL REMOVE", name)

    def sentinel_sentinels(self, service_name):
        """Returns a list of sentinels for ``service_name``"""
        return self.execute_command(
            "SENTINEL SENTINELS", service_name, return_responses=True
        )

    def sentinel_set(self, name, option, value):
        """Set Sentinel monitoring parameters for a given master"""
        return self.execute_command("SENTINEL SET", name, option, value)

    def sentinel_slaves(self, service_name):
        """
        Returns a list of slaves for ``service_name``

        Important: This function is called by the Sentinel implementation and is
        called directly on the Redis standalone client for sentinels,
        so it doesn'tsupport the "once" and "return_responses" options.
        """
        return self.execute_command("SENTINEL SLAVES", service_name)

    def sentinel_reset(self, pattern):
        """
        This command will reset all the masters with matching name.
        The pattern argument is a glob-style pattern.

        The reset process clears any previous state in a master (including a
        failover in progress), and removes every slave and sentinel already
        discovered and associated with the master.
        """
        return self.execute_command("SENTINEL RESET", pattern, once=True)

    def sentinel_failover(self, new_master_name):
        """
        Force a failover as if the master was not reachable, and without
        asking for agreement to other Sentinels (however a new version of the
        configuration will be published so that the other Sentinels will
        update their configurations).
        """
        return self.execute_command("SENTINEL FAILOVER", new_master_name)

    def sentinel_ckquorum(self, new_master_name):
        """

Review comment (suggestion):
Missing space in comment: update 'doesn'tsupport' to 'doesn't support'.
```suggestion
        so it doesn't support the "once" and "return_responses" options.
```

Code after:

        Important: This function is called by the Sentinel implementation and is
        called directly on the Redis standalone client for sentinels,
        so it doesn't support the "once" and "return_responses" options.
        """
        return self.execute_command("SENTINEL MASTERS")

    def sentinel_monitor(self, name, ip, port, quorum):
        """Add a new master to Sentinel to be monitored"""
        return self.execute_command("SENTINEL MONITOR", name, ip, port, quorum)

    def sentinel_remove(self, name):
        """Remove a master from Sentinel's monitoring"""
        return self.execute_command("SENTINEL REMOVE", name)

    def sentinel_sentinels(self, service_name, return_responses=False):
        """
        Returns a list of sentinels for ``service_name``, when return_responses is True,
        otherwise returns a boolean value that indicates if the command was successful.
        """
        return self.execute_command(
            "SENTINEL SENTINELS", service_name, return_responses=return_responses
        )

    def sentinel_set(self, name, option, value):
        """Set Sentinel monitoring parameters for a given master"""
        return self.execute_command("SENTINEL SET", name, option, value)

    def sentinel_slaves(self, service_name):
        """
        Returns a list of slaves for ``service_name``

        Important: This function is called by the Sentinel implementation and is
        called directly on the Redis standalone client for sentinels,
        so it doesn't support the "once" and "return_responses" options.
        """
        return self.execute_command("SENTINEL SLAVES", service_name)

    def sentinel_reset(self, pattern):
        """
        This command will reset all the masters with matching name.
        The pattern argument is a glob-style pattern.

        The reset process clears any previous state in a master (including a
        failover in progress), and removes every slave and sentinel already
        discovered and associated with the master.
        """
        return self.execute_command("SENTINEL RESET", pattern, once=True)

    def sentinel_failover(self, new_master_name):
        """