<commit_before>"""
Interfaces.
"""
from zope.interface import Attribute, Interface


class IStep(Interface):
    """
    A step in an excerise.
    """
    nextStep = Attribute(
        """
        The step following this one, or None if this is the last step.
        """)



class IRenderer(Interface):
    """
    Renders a step in an exercise.
    """
    def render(userStore):
        """
        Renders a step, using the context of a user store.
        """



class IValidator(Interface):
    """
    A validator for a step in an exercise.
    """
    def validate(userStore, submission):
        """<commit_msg>Flip order of userStore and submission in IValidator<commit_after>"""
Interfaces.
"""
from zope.interface import Attribute, Interface


class IStep(Interface):
    """
    A step in an excerise.
    """
    nextStep = Attribute(
        """
        The step following this one, or None if this is the last step.
        """)



class IRenderer(Interface):
    """
    Renders a step in an exercise.
    """
    def render(userStore):
        """
        Renders a step, using the context of a user store.
        """



class IValidator(Interface):
    """
    A validator for a step in an exercise.
    """
    def validate(submission, userStore):
        """
{'fraction_non_alphanumeric': 0.11085089773614364, 'fraction_numerical': 0.0, 'mean_word_length': 2.253807106598985, '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': '2184265', 'n_tokens_mistral': 370, 'n_tokens_neox': 357, 'n_words': 131}