<commit_before># -*- coding: utf-8 -*-
"""REdis Serialization Protocol (RESP) data types handling."""

from .exceptions import ParseError, ParseError, RedisError


CRLF = "\r\n"
CRLFLEN = len(CRLF)


class ParseError(Exception):
    """Incomplete input while parsing RESP data."""


def encode_request(*args):
    """Pack a series of arguments into a RESP array of bulk string."""
    result = []
    result.append("*")
    result.append(str(len(args)))
    result.append(CRLF)
    
    for arg in args:
        result.append(encode_bulk_string(str('' if arg is None else arg)))

    return "".join(result)


def encode_bulk_string(s):<commit_msg>Adapt to changes in 'picoredis.py'<commit_after># -*- coding: utf-8 -*-
"""REdis Serialization Protocol (RESP) data types handling."""

from .exceptions import ParseError, ParseError, RedisError


CRLF = "\r\n"
CRLFLEN = len(CRLF)


class ParseError(Exception):
    """Incomplete input while parsing RESP data."""


def encode_request(*args):
    """Pack a series of arguments into a RESP array of bulk strings."""
    result = ["*" + str(len(args)) + CRLF]
    
    for arg in args:
        if arg is None:
            result.append('$-1' + CRLF)
        else:
            s = str(arg)
            result.append('$' + str(len(s)) + CRLF + s + CRLF)

    return "".join(result)


def encode_bulk_string(s):
{'fraction_non_alphanumeric': 0.1433850702143385, 'fraction_numerical': 0.0022172949002217295, 'mean_word_length': 3.166153846153846, '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': '4099358', 'n_tokens_mistral': 451, 'n_tokens_neox': 429, 'n_words': 131}