<commit_before>import abc


class DriverPlatformInterface(metaclass=abc.ABCMeta):
    """
    DriverPlatformInterface is an abstract base class that should be overridden for all
    driver interface classes on supported platforms.  This class ensures the proper required
    methods are implemented to support driver operations in MPF.
    """

    @abc.abstractmethod
    def disable(self):
        """Disabled the driver"""
        raise NotImplementedError('disable method must be defined to use this base class')

    @abc.abstractmethod
    def enable(self):
        """Enables this driver, which means it's held "on" indefinitely until
        it's explicitly disabled.
        """
        raise NotImplementedError('enable method must be defined to use this base class')

    @abc.abstractmethod
    def pulse(self, milliseconds=None):
        """Pulses this driver for a pre-determined amount of time, after which
        this driver is turned off automatically. Note that on most platforms,
        pulse times are a max of 255ms. (Beyond that MPF will send separate
        enable() and disable() commands.

        Args:
            milliseconds: The number of ms to pulse this driver for. You should
                raise a ValueError if the value is out of range for your
                platform. If this value is None, you should pulse this driver
                with a default setting. You can set the default in the driver
                config via your __init__() method, or you can pick some default
                that's hard coded.

        Returns:
            A integer of the actual time this driver is going to be pulsed for.
            MPF uses this for timing in certain situations to make sure too
            many drivers aren't activated at once.

        """
        raise NotImplementedError('pulse method must be defined to use this base class')<commit_msg>add get_pulse_ms to baseclass because snux needs it<commit_after>import abc


class DriverPlatformInterface(metaclass=abc.ABCMeta):
    """
    DriverPlatformInterface is an abstract base class that should be overridden for all
    driver interface classes on supported platforms.  This class ensures the proper required
    methods are implemented to support driver operations in MPF.
    """

    @abc.abstractmethod
    def disable(self):
        """Disabled the driver"""
        raise NotImplementedError('disable method must be defined to use this base class')

    @abc.abstractmethod
    def enable(self):
        """Enables this driver, which means it's held "on" indefinitely until
        it's explicitly disabled.
        """
        raise NotImplementedError('enable method must be defined to use this base class')

    @abc.abstractmethod
    def pulse(self, milliseconds=None):
        """Pulses this driver for a pre-determined amount of time, after which
        this driver is turned off automatically. Note that on most platforms,
        pulse times are a max of 255ms. (Beyond that MPF will send separate
        enable() and disable() commands.

        Args:
            milliseconds: The number of ms to pulse this driver for. You should
                raise a ValueError if the value is out of range for your
                platform. If this value is None, you should pulse this driver
                with a default setting. You can set the default in the driver
                config via your __init__() method, or you can pick some default
                that's hard coded.

        Returns:
            A integer of the actual time this driver is going to be pulsed for.
            MPF uses this for timing in certain situations to make sure too
            many drivers aren't activated at once.

        """
        raise NotImplementedError('pulse method must be defined to use this base class')

    def get_pulse_ms(self):
        # returns the pulse_ms for this driver. needed by snux
        raise NotImplementedError('pulse method must be defined to use this base class')
{'fraction_non_alphanumeric': 0.049663089593211876, 'fraction_numerical': 0.0014973795857249812, 'mean_word_length': 2.518876207199298, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '368174', 'n_tokens_mistral': 958, 'n_tokens_neox': 895, 'n_words': 488}