<commit_before>import time
import transitions

from panoptes.utils.logger import has_logger


@has_logger
class PanState(transitions.State):

    """ Base class for PANOPTES transitions """

    def __init__(self, *args, **kwargs):
        name = kwargs.get('name', self.__class__)

        self.panoptes = kwargs.get('panoptes', None)

        super().__init__(name=name, on_enter=['execute'])

        self._sleep_delay = 3  # seconds

    def main(self):
        assert self.panoptes is not None
        msg = "Must implement `main` method inside class {}. Exiting".format(self.name)
        self.panoptes.logger.warning(msg)
        return 'exit'

    def sleep(self, seconds=None):
        """ sleep for `seconds` or `_sleep_delay` seconds

        This puts the state into a loop that is responsive to outside  messages.<commit_msg>Remove return state from main `main`<commit_after>import time
import transitions

from panoptes.utils.logger import has_logger


@has_logger
class PanState(transitions.State):

    """ Base class for PANOPTES transitions """

    def __init__(self, *args, **kwargs):
        name = kwargs.get('name', self.__class__)

        self.panoptes = kwargs.get('panoptes', None)

        super().__init__(name=name, on_enter=['execute'])

        self._sleep_delay = 3  # seconds

    def main(self):
        assert self.panoptes is not None
        msg = "Must implement `main` method inside class {}. Exiting".format(self.name)
        self.panoptes.logger.warning(msg)

    def sleep(self, seconds=None):
        """ sleep for `seconds` or `_sleep_delay` seconds

        This puts the state into a loop that is responsive to outside  messages.
{'fraction_non_alphanumeric': 0.10852713178294573, 'fraction_numerical': 0.0011926058437686344, 'mean_word_length': 3.1330049261083746, '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': '3731278', 'n_tokens_mistral': 497, 'n_tokens_neox': 476, 'n_words': 144}