<commit_before>import sublime, sublime_plugin
import threading
import subprocess
import os
import sys
import re

class GitCommitMsgThread(threading.Thread):
  def __init__(self, file_name, start_line, end_line):
    threading.Thread.__init__(self)
    if sublime.platform() == 'windows':
      cmd = 'echo off && ' \
        'for /f "tokens=1" %%a in ' \
        '( \'"git blame "%s" -L %d,%d --root -s -l"\') do ' \
        'git show --name-status "%%a"'
    else:
      cmd = "git show --name-status $(git blame '%s' -L %d,%d | " \
        "awk '{print $1}')"
    self.command = cmd % (file_name, start_line, end_line)
    self.dir_name = os.path.dirname(file_name)

  def run(self):
    print('GitCommitMsg - Command: %s' % self.command)
    pr = subprocess.Popen(self.command, cwd = self.dir_name, \
      shell = True, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
    (out, error) = pr.communicate()
    self.result = out<commit_msg>Remove unused re module import<commit_after>import sublime, sublime_plugin
import threading
import subprocess
import os
import sys

class GitCommitMsgThread(threading.Thread):
  def __init__(self, file_name, start_line, end_line):
    threading.Thread.__init__(self)
    if sublime.platform() == 'windows':
      cmd = 'echo off && ' \
        'for /f "tokens=1" %%a in ' \
        '( \'"git blame "%s" -L %d,%d --root -s -l"\') do ' \
        'git show --name-status "%%a"'
    else:
      cmd = "git show --name-status $(git blame '%s' -L %d,%d | " \
        "awk '{print $1}')"
    self.command = cmd % (file_name, start_line, end_line)
    self.dir_name = os.path.dirname(file_name)

  def run(self):
    print('GitCommitMsg - Command: %s' % self.command)
    pr = subprocess.Popen(self.command, cwd = self.dir_name, \
      shell = True, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
    (out, error) = pr.communicate()
    self.result = out
{'fraction_non_alphanumeric': 0.15709014232999474, 'fraction_numerical': 0.0021085925144965737, 'mean_word_length': 2.91340206185567, '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': '713085', 'n_tokens_mistral': 678, 'n_tokens_neox': 661, 'n_words': 173}