<commit_before>from __future__ import print_function
import sys
import os
from sh import cd, hg


def _get_subdirectories(current_dir):
    return [directory for directory in os.listdir(current_dir) 
            if os.path.isdir(os.path.join(current_dir, directory))
            and directory[0] != '.']


def check():
    current_working_directory = os.getcwd()
    child_dirs = _get_subdirectories(current_working_directory)
    for child in child_dirs:
        try:
            change_dir = '%s/%s' % (current_working_directory, child)
            cd(change_dir); current_branch = hg('branch')

            output = '%-25s is on branch: %s' % (child, current_branch)

            print(output, end=''); cd('..')  # print and step back one dir
        except Exception:
            continue


def main():
    arguments = sys.argv    
    if 'check' == arguments[1]:<commit_msg>Remove change dir commands and now it sends directly.<commit_after>from __future__ import print_function
import sys
import os
from sh import cd, hg


def _get_subdirectories(current_dir):
    return [directory for directory in os.listdir(current_dir) 
            if os.path.isdir(os.path.join(current_dir, directory))
            and directory[0] != '.']


def check():
    current_working_directory = os.getcwd()
    child_dirs = _get_subdirectories(current_working_directory)
    for child in child_dirs:
        try:
            current_branch = hg('branch', '-R', './%s' % child)
            output = '%-25s is on branch: %s' % (child, current_branch)
            print(output, end='')

        except Exception as e:
            continue


def main():
    arguments = sys.argv    
    if 'check' == arguments[1]:
{'fraction_non_alphanumeric': 0.10783736004714202, 'fraction_numerical': 0.004714201532115498, 'mean_word_length': 2.764966740576497, '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': '183421', 'n_tokens_mistral': 515, 'n_tokens_neox': 503, 'n_words': 142}