<commit_before>import zeit.website.interfaces
from zeit.cms.section.interfaces import ISectionMarker
import grokcore.component as grok
import zeit.cms.checkout.interfaces
import zeit.cms.content.interfaces
import zope.interface


@grok.subscribe(
    zeit.cms.content.interfaces.ICommonMetadata,
    zeit.cms.checkout.interfaces.IBeforeCheckinEvent)
def provide_website_content(content, event):
    content = zope.security.proxy.getObject(content)
    if not content.rebrush_website_content:
        return
    for iface in zope.interface.providedBy(content):
        if issubclass(iface, ISectionMarker):
            zope.interface.noLongerProvides(content, iface)
    zope.interface.alsoProvides(content, zeit.website.interfaces.IWebsiteSection)
<commit_msg>Remove iface, if rebrush_contetn ist not set<commit_after>import zeit.website.interfaces
from zeit.cms.section.interfaces import ISectionMarker
import grokcore.component as grok
import zeit.cms.checkout.interfaces
import zeit.cms.content.interfaces
import zope.interface


@grok.subscribe(
    zeit.cms.content.interfaces.ICommonMetadata,
    zeit.cms.checkout.interfaces.IBeforeCheckinEvent)
def provide_website_content(content, event):
    content = zope.security.proxy.getObject(content)
    if not content.rebrush_website_content:
        zope.interface.noLongerProvides(content,
            zeit.website.interfaces.IWebsiteSection)
        return
    for iface in zope.interface.providedBy(content):
        if issubclass(iface, ISectionMarker):
            zope.interface.noLongerProvides(content, iface)
    zope.interface.alsoProvides(content, zeit.website.interfaces.IWebsiteSection)

{'fraction_non_alphanumeric': 0.08166969147005444, 'fraction_numerical': 0.0, 'mean_word_length': 4.664383561643835, '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': '1179466', 'n_tokens_mistral': 532, 'n_tokens_neox': 501, 'n_words': 86}