<commit_before>import os
import re
import sublime
import sublime_plugin


class ExpandTabsOnLoad(sublime_plugin.EventListener):
    # Run ST's 'expand_tabs' command when opening a file,
    # only if there are any tab characters in the file
    def on_load(self, view):
        expand_tabs = view.settings().get("expand_tabs_on_load", False)
        if expand_tabs and view.find("\t", 0):
            view.run_command("expand_tabs")
            tab_size = view.settings().get("tab_size", 0)
            message = "Converted tab characters to {0} spaces".format(tab_size)
            sublime.status_message(message)<commit_msg>Fixed for Sublime Text 3, closes #1<commit_after>import os
import re
import sublime
import sublime_plugin


class ExpandTabsOnLoad(sublime_plugin.EventListener):
    # Run ST's 'expand_tabs' command when opening a file,
    # only if there are any tab characters in the file
    def on_load(self, view):
        expand_tabs = view.settings().get("expand_tabs_on_load", False)
        if expand_tabs and view.find("\t", 0):
            view.run_command("expand_tabs", {"set_translate_tabs": True})
            tab_size = view.settings().get("tab_size", 0)
            message = "Converted tab characters to {0} spaces".format(tab_size)
            sublime.status_message(message)
{'fraction_non_alphanumeric': 0.09969325153374232, 'fraction_numerical': 0.006134969325153374, 'mean_word_length': 3.4237288135593222, 'pattern_counts': {'":': 1, '<': 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': '1025757', 'n_tokens_mistral': 398, 'n_tokens_neox': 382, 'n_words': 109}