<commit_before>from __future__ import absolute_import, unicode_literals

import re

import sqlparse
from django.utils.html import escape
from sqlparse import tokens as T


class BoldKeywordFilter:
    """sqlparse filter to bold SQL keywords"""
    def process(self, stack, stream):
        """Process the token stream"""
        for token_type, value in stream:
            is_keyword = token_type in T.Keyword
            if is_keyword:
                yield T.Text, '<strong>'
            yield token_type, escape(value)<commit_msg>Fix #852, anyway this parameter never used<commit_after>from __future__ import absolute_import, unicode_literals

import re

import sqlparse
from django.utils.html import escape
from sqlparse import tokens as T


class BoldKeywordFilter:
    """sqlparse filter to bold SQL keywords"""
    def process(self, stream):
        """Process the token stream"""
        for token_type, value in stream:
            is_keyword = token_type in T.Keyword
            if is_keyword:
                yield T.Text, '<strong>'
            yield token_type, escape(value)
{'fraction_non_alphanumeric': 0.07064220183486239, 'fraction_numerical': 0.0027522935779816515, 'mean_word_length': 2.9244604316546763, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6592133', 'n_tokens_mistral': 289, 'n_tokens_neox': 281, 'n_words': 108}