<commit_before>"""Forms for auth package."""


from flask_wtf import FlaskForm, RecaptchaField
from wtforms import PasswordField, StringField, BooleanField
from wtforms.fields.html5 import EmailField
from wtforms.validators import InputRequired, Email, EqualTo, Length


class LoginForm(FlaskForm):
    """Login form for the application."""

    email = EmailField('Email', validators=[InputRequired(), Email()])
    password = PasswordField('Password', validators=[InputRequired()])
    remember_me = BooleanField('Remember me')


class RegistrationForm(FlaskForm):
    """Registration form for new users."""

    username = StringField('Username', validators=[InputRequired(),
                                                   Length(min=3, max=25)])
    email = StringField('Email', validators=[InputRequired(),
                                             Email(message=None),
                                             Length(min=6, max=40)])
    password = PasswordField('Password', validators=[InputRequired(),
                                                     Length(min=6, max=25)])
    confirm_password = PasswordField(
        '<PASSWORD>',
        validators=[InputRequired(), EqualTo('password',
                                             message='Passwords must match.')])
    recaptcha = RecaptchaField()


class ProfileForm(FlaskForm):
    """Form with user's details."""

    username = StringField('Username', validators=[InputRequired(),
                                                   Length(min=3, max=25)])
    email = StringField('Email', validators=[InputRequired(),
                                             Email(message=None),
                                             Length(min=6, max=40)])


class ChangePasswordForm(FlaskForm):
    """Form for changing user's password."""

    password = PasswordField('<PASSWORD>',
                             validators=[InputRequired(),
                                         Length(min=6, max=25)])
    new_password = PasswordField('<PASSWORD>',
                                 validators=[InputRequired(),
                                             Length(min=6, max=25)])
    confirm_password = PasswordField(
        'Confirm new password',
        validators=[InputRequired(),
                    EqualTo('new_password', message='Passwords must match.')])


class RequestPasswordResetForm(FlaskForm):
    """Form for requesting password reset."""<commit_msg>remove unused forms<commit_after>"""Forms for auth package."""


from flask_wtf import FlaskForm
from wtforms import PasswordField, StringField
from wtforms.validators import InputRequired, Email, EqualTo, Length


class ChangePasswordForm(FlaskForm):
    """Form for changing user's password."""

    password = PasswordField('<PASSWORD>',
                             validators=[InputRequired(),
                                         Length(min=6, max=25)])
    new_password = PasswordField('<PASSWORD> password',
                                 validators=[InputRequired(),
                                             Length(min=6, max=25)])
    confirm_password = PasswordField(
        'Confirm new password',
        validators=[InputRequired(),
                    EqualTo('new_password', message='Passwords must match.')])


class RequestPasswordResetForm(FlaskForm):
    """Form for requesting password reset."""
{'fraction_non_alphanumeric': 0.1106181603076013, 'fraction_numerical': 0.008281573498964804, 'mean_word_length': 2.0914076782449724, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1039437', 'n_tokens_mistral': 781, 'n_tokens_neox': 730, 'n_words': 183}