<commit_before># coding: utf-8
import logging
import os
import tempfile

from django.core.mail.message import EmailMessage
import xlwt

log = logging.getLogger(__name__)

style_bold = xlwt.easyxf(u'font: bold 1;')
style_1cm = xlwt.easyxf(u'font: height 450;')
style_right = xlwt.easyxf(u'align: horiz right')
style_left = xlwt.easyxf(u'align: horiz left')
style_center = xlwt.easyxf(u'align: horiz center;')
shift_time_full_format = '%d.%m.%Y %H:%M'
shift_time_short_format = '%H:%M'


class GenerateExcelSheet:
    def __init__(self, shifts, mailer):
        if not shifts:
            raise AssertionError(u'No shifts given. Cannot generate Excel file.')

        self.shifts = shifts
        self.mailer = mailer
        self.tmpdir = tempfile.mkdtemp()
        self.tmpfiles = []

    def __del__(self):<commit_msg>Error message improved a little<commit_after># coding: utf-8
import logging
import os
import tempfile

from django.core.mail.message import EmailMessage
import xlwt

log = logging.getLogger(__name__)

style_bold = xlwt.easyxf(u'font: bold 1;')
style_1cm = xlwt.easyxf(u'font: height 450;')
style_right = xlwt.easyxf(u'align: horiz right')
style_left = xlwt.easyxf(u'align: horiz left')
style_center = xlwt.easyxf(u'align: horiz center;')
shift_time_full_format = '%d.%m.%Y %H:%M'
shift_time_short_format = '%H:%M'


class GenerateExcelSheet:
    def __init__(self, shifts, mailer):
        if not shifts:
            raise AssertionError(u'No shifts given. Cannot generate Excel file for {}.'.format(mailer.location))

        self.shifts = shifts
        self.mailer = mailer
        self.tmpdir = tempfile.mkdtemp()
        self.tmpfiles = []

    def __del__(self):
{'fraction_non_alphanumeric': 0.11855364552459988, 'fraction_numerical': 0.007113218731475993, 'mean_word_length': 3.9501466275659824, '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': '7289794', 'n_tokens_mistral': 612, 'n_tokens_neox': 569, 'n_words': 143}