<commit_before># this is the main file that get called
import os
import sys
import gitTA
import colorama
from colorama import Fore, Back  # add color output to terminal: we want anything printed to be VERY visible to user
colorama.init()  # called so that windows colors work
'''
modify this file! When git runs certain commands, it will run THIS main.py
which will trigger the functions you've decorated here with gitta.listen('event-name')
your methods can listen for the following events:
pre-push, pre-commit,  # pre-x methods can be aborted by raising an exception
post-commit, post-checkout, post-merge
'''
git = gitTA.gitta()

# pre-* events can be aborted by raising an exception ???
@git.listen('pre-push')
def prepush(*args, **kwargs):
    print(Fore.GREEN)  # set so that ALL next prints will be green
    print(args)

@git.listen('pre-commit')
def precommit(*args, **kwargs):
    print(Fore.GREEN)
    print(args)

@git.listen('post-commit')
def postcommit(*args, **kwargs):
    print(Fore.GREEN)
    print(args)

@git.listen('post-checkout')
def postcheckout(*args, **kwargs):
    print(Fore.GREEN)  # set so that ALL next prints will be green
    print(args)

@git.listen('post-merge')
def postmerge(*args, **kwargs):
    print(args)

if __name__ == '__main__':
    gitTA.gitta.trigger_all_instances(45, event='post-checkout')  # example of what might get passed to postcheckout
    # the garbled message that appears before (45, ) is the Fore.GREEN. On normal terminals this garbled output will NOT appear
    

# ['.gitta/py/main.py', 'pre-push', 'origin', 'https://github.com/lancekindle/test.git']
# ['.gitta/py/main.py', 'pre-commit']
# ['.gitta/py/main.py', 'post-commit']<commit_msg>print kwargs on default functions<commit_after># this is the main file that get called
import os
import sys
import gitTA
import colorama
from colorama import Fore, Back  # add color output to terminal: we want anything printed to be VERY visible to user
colorama.init()  # called so that windows colors work
'''
modify this file! When git runs certain commands, it will run THIS main.py
which will trigger the functions you've decorated here with gitta.listen('event-name')
your methods can listen for the following events:
pre-push, pre-commit,  # pre-x methods can be aborted by raising an exception
post-commit, post-checkout, post-merge
'''
git = gitTA.gitta()

# pre-* events can be aborted by raising an exception ???
@git.listen('pre-push')
def prepush(*args, **kwargs):
    print(Fore.GREEN)  # set so that ALL next prints will be green
    print(args, kwargs)

@git.listen('pre-commit')
def precommit(*args, **kwargs):
    print(Fore.GREEN)
    print(args, kwargs)

@git.listen('post-commit')
def postcommit(*args, **kwargs):
    print(Fore.GREEN)
    print(args, kwargs)

@git.listen('post-checkout')
def postcheckout(*args, **kwargs):
    print(Fore.GREEN)  # set so that ALL next prints will be green
    print(args, kwargs)

@git.listen('post-merge')
def postmerge(*args, **kwargs):
    print(args, kwargs)

if __name__ == '__main__':
    gitTA.gitta.trigger_all_instances(45, event='post-checkout')  # example of what might get passed to postcheckout
    # the garbled message that appears before (45, ) is the Fore.GREEN. On normal terminals this garbled output will NOT appear
    

# ['.gitta/py/main.py', 'pre-push', 'origin', 'https://github.com/lancekindle/test.git']
# ['.gitta/py/main.py', 'pre-commit']
# ['.gitta/py/main.py', 'post-commit']
{'fraction_non_alphanumeric': 0.1260092272202999, 'fraction_numerical': 0.002306805074971165, 'mean_word_length': 4.386645962732919, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '427488', 'n_tokens_mistral': 1095, 'n_tokens_neox': 1088, 'n_words': 382}