<commit_before>"""
Tools for generating forms based on Peewee models
(cribbed from wtforms.ext.django)
"""
from wtforms import fields as f
from wtforms import Form
from wtforms import validators
from wtfpeewee.fields import ModelSelectField

from peewee import PrimaryKeyField, IntegerField, FloatField, DateTimeField,\
    BooleanField, CharField, TextField, ForeignKeyField


__all__ = (
    'model_fields', 'model_form',
)


class ModelConverter(object):
    defaults = {
        PrimaryKeyField: f.HiddenField,
        IntegerField: f.IntegerField,
        FloatField: f.FloatField,
        DateTimeField: f.DateTimeField,<commit_msg>Adding decimal field to wtfpeewee<commit_after>"""
Tools for generating forms based on Peewee models
(cribbed from wtforms.ext.django)
"""
from wtforms import fields as f
from wtforms import Form
from wtforms import validators
from wtfpeewee.fields import ModelSelectField

from peewee import PrimaryKeyField, IntegerField, FloatField, DateTimeField,\
    BooleanField, CharField, TextField, ForeignKeyField, DecimalField


__all__ = (
    'model_fields', 'model_form',
)


class ModelConverter(object):
    defaults = {
        PrimaryKeyField: f.HiddenField,
        IntegerField: f.IntegerField,
        FloatField: f.FloatField,
        DecimalField: f.DecimalField,
        DateTimeField: f.DateTimeField,
{'fraction_non_alphanumeric': 0.07418397626112759, 'fraction_numerical': 0.0, 'mean_word_length': 4.374501992031872, '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': '1408417', 'n_tokens_mistral': 400, 'n_tokens_neox': 380, 'n_words': 116}