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

Code before:
    def sentinel(self, *args):
        """Redis Sentinel's SENTINEL command."""
        warnings.warn(DeprecationWarning("Use the individual sentinel_* methods"))

    def sentinel_get_master_addr_by_name(self, service_name):
        """Returns a (host, port) pair for the given ``service_name``"""
        return self.execute_command(
            "SENTINEL GET-MASTER-ADDR-BY-NAME",
            service_name,
            once=True,
            return_responses=True,
        )

    def sentinel_master(self, service_name):
        """Returns a dictionary containing the specified masters state."""
        return self.execute_command(
            "SENTINEL MASTER", service_name, return_responses=True
        )

    def sentinel_masters(self):
        """
        Returns a list of dictionaries containing each master's state.

        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 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):
        """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``


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:
    def sentinel(self, *args):
        """Redis Sentinel's SENTINEL command."""
        warnings.warn(DeprecationWarning("Use the individual sentinel_* methods"))

    def sentinel_get_master_addr_by_name(self, service_name, return_responses=False):
        """
        Returns a (host, port) pair for the given ``service_name`` when return_responses is True,
        otherwise returns a boolean value that indicates if the command was successful.
        """
        return self.execute_command(
            "SENTINEL GET-MASTER-ADDR-BY-NAME",
            service_name,
            once=True,
            return_responses=return_responses,
        )

    def sentinel_master(self, service_name, return_responses=False):
        """
        Returns a dictionary containing the specified masters state, when return_responses is True,
        otherwise returns a boolean value that indicates if the command was successful.
        """
        return self.execute_command(
            "SENTINEL MASTER", service_name, return_responses=return_responses
        )

    def sentinel_masters(self):
        """
        Returns a list of dictionaries containing each master's state.

        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
        )