<commit_before># Copyright 2019 by <NAME>. All rights reserved.


def split_list(my_list, indentation_spaces=8, items_per_line=4):
    edited_list = ''
    if isinstance(my_list, tuple):
        line = " " * indentation_spaces + "("
        for counter, item in enumerate(my_list):
            if (counter + 1) % items_per_line != 0:
                line += '"' + item + '"' + ', '
            else:
                line += '\n'
                edited_list += line
                line = " " * indentation_spaces + '"' + item + '"' + ', '





<commit_msg>split list style.<commit_after># Copyright 2019 by <NAME>. All rights reserved.

import sys


def split_list(my_list, spaces=8, items_per_line=4):
    edited_list = ''
    if isinstance(my_list, tuple) or isinstance(my_list,list):
        if isinstance(my_list,tuple):
            start_char = "("
            end_char = ")"
            print('This is a tuple')
        else:
            start_char = "("
            end_char = ")"
            print('This is a list')

        line = " " * spaces + start_char
        for counter, item in enumerate(my_list):
            if counter % items_per_line == 0:
                if counter == 0:
                    line += '"' + item + str(counter) + '"' + ', '
                else:
                    line += '\n'
                    edited_list += line
                    line = " " * spaces + '"' + item + str(counter) + '"' + ', '
            else:
                line += '"' + item + str(counter) + '"' + ', '
        line += '\n'
        edited_list += line
        edited_list += ' ' * spaces + end_char

    else:
        raise ValueError('Only for tuple and list, not for ', type(my_list))

    print(edited_list)

    return edited_list


if __name__ == '__main__':
    sys.exit(main())





{'fraction_non_alphanumeric': 0.13747228381374724, 'fraction_numerical': 0.008869179600886918, 'mean_word_length': 1.6661742983751846, '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': '4012716', 'n_tokens_mistral': 564, 'n_tokens_neox': 520, 'n_words': 130}