<commit_before># -*- coding: utf-8 -*-
"""Django template engine."""
from __future__ import absolute_import  # Required to ``import from django``
                                        # because our file is called django.py

from django.conf import settings
from django.template import Template, Context, TemplateSyntaxError

from piecutter.engines import Engine
from piecutter.exceptions import TemplateError

settings.configure()


class DjangoEngine(Engine):
    """Django template engine."""
    def render(self, template, context):
        """Return the rendered template against context."""
        try:
            return Template(template).render(Context(context))
        except TemplateSyntaxError as e:
            raise TemplateError(e)<commit_msg>Fixed compliance to latest flake8.<commit_after># -*- coding: utf-8 -*-
"""Django template engine."""
from __future__ import absolute_import  # Remove ambiguity of ``import django``

from django.conf import settings
from django.template import Template, Context, TemplateSyntaxError

from piecutter.engines import Engine
from piecutter.exceptions import TemplateError

settings.configure()


class DjangoEngine(Engine):
    """Django template engine."""
    def render(self, template, context):
        """Return the rendered template against context."""
        try:
            return Template(template).render(Context(context))
        except TemplateSyntaxError as e:
            raise TemplateError(e)
{'fraction_non_alphanumeric': 0.09202453987730061, 'fraction_numerical': 0.002044989775051125, 'mean_word_length': 3.503067484662577, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6172056', 'n_tokens_mistral': 344, 'n_tokens_neox': 337, 'n_words': 125}