<commit_before>from json import loads
from tornado.web import RequestHandler

from cherrycommon.pathutils import norm_path
from cherrycommon.handlers import CherryStaticHandler as _CherryStaticHandler
from cherrycommon.handlers import CherryTemplateLoader as _CherryTemplateLoader
from cherrycommon.handlers import CherryURLSpec

from cherryforms import module_path, CherryFormsSettings, _DEFAULT, _DEFAULT_SETTINGS


class FormsURLSpec(CherryURLSpec):
    def __init__(self, pattern, handler_class, kwargs=None, prefix=_DEFAULT):
        if prefix is _DEFAULT:
            prefix = _DEFAULT_SETTINGS['prefix']
        super(FormsURLSpec, self).__init__(pattern, handler_class, kwargs, prefix)


class FormsTemplateLoader(_CherryTemplateLoader):
    def __init__(self, path, **kwargs):
        super(FormsTemplateLoader, self).__init__(path, **kwargs)
        self.path.append(norm_path(module_path, 'templates'))<commit_msg>Some light and order in imports<commit_after>from json import loads
from tornado.web import RequestHandler

from cherrycommon.pathutils import norm_path
from cherrycommon.handlers import CherryStaticHandler as _CherryStaticHandler
from cherrycommon.handlers import CherryTemplateLoader, CherryURLSpec

from cherryforms import module_path, CherryFormsSettings, _DEFAULT, _DEFAULT_SETTINGS


class FormsURLSpec(CherryURLSpec):
    def __init__(self, pattern, handler_class, kwargs=None, prefix=_DEFAULT):
        if prefix is _DEFAULT:
            prefix = _DEFAULT_SETTINGS['prefix']
        super(FormsURLSpec, self).__init__(pattern, handler_class, kwargs, prefix)


class FormsTemplateLoader(CherryTemplateLoader):
    def __init__(self, path, **kwargs):
        super(FormsTemplateLoader, self).__init__(path, **kwargs)
        self.path.append(norm_path(module_path, 'templates'))
{'fraction_non_alphanumeric': 0.07296849087893864, 'fraction_numerical': 0.0, 'mean_word_length': 5.856060606060606, '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': '4190957', 'n_tokens_mistral': 503, 'n_tokens_neox': 479, 'n_words': 129}