<commit_before>import sublime
import sublime_plugin
import json
import os.path
import sys
from sublime_plugin import EventListener

TOGGLE_TABS = 'toggle_tabs'


class Listener(EventListener):

    def on_window_command(self, window, command, option):
        # toggle_tabs command except it does not control.
        if(command != TOGGLE_TABS):
            return

        if(option == 'hide_tabs' and TabStatusStore.getTabCloseFlag()):
            # set tab hide flag.
            TabStatusStore.setShowTabStatus(False)
        elif(not TabStatusStore.getTabCloseFlag()):
            # set tab show/hide flag.
            TabStatusStore.setShowTabStatus(
                not TabStatusStore.getShowTabStatus())
        else:
            # force disable disable the tab control of the menu.
            return ('None')


class TabStatusStore():
    # show_tabs parameter from Session.sublime_session.
    _show_tab_status = {}

    # auto tab closing flag.
    _tab_close_flag = None

    @staticmethod
    def getActiveWindowId():
        return sublime.active_window().id()

    @classmethod
    def getShowTabStatus(store):
        # get active window_id
        window_id = store.getActiveWindowId()

        if(not window_id in store._show_tab_status):
            store._show_tab_status[window_id] = None

        return store._show_tab_status[window_id]

    @classmethod
    def setShowTabStatus(store, status):
        # get active window_id
        window_id = store.getActiveWindowId()

        # set show_tab_status.
        store._show_tab_status[window_id] = status

    @classmethod
    def getTabCloseFlag(store):
        return store._tab_close_flag

    @classmethod
    def setTabCloseFlag(store, flag):
        store._tab_close_flag = flag


class SidebarSeparator(sublime_plugin.TextCommand):

    def run(self, edit):
        # get setting values from setting file.
        setting_values = self.getSettingValues()

        # set separate data.
        separate_value = self.setSeparate(setting_values)

        # create separate file.
        separate_file = sublime.active_window().new_file()

        # set buffer name.
        separate_file.set_name(separate_value)

        # set not save as separate file propertie.
        separate_file.set_scratch(True)

        # set read only propertie.
        separate_file.set_read_only(True)<commit_msg>fixed import package.<commit_after>import sublime
import json
import os.path
import sys
from sublime_plugin import TextCommand
from sublime_plugin import EventListener

TOGGLE_TABS = 'toggle_tabs'


class Listener(EventListener):

    def on_window_command(self, window, command, option):
        # toggle_tabs command except it does not control.
        if(command != TOGGLE_TABS):
            return

        if(option == 'hide_tabs' and TabStatusStore.getTabCloseFlag()):
            # set tab hide flag.
            TabStatusStore.setShowTabStatus(False)
        elif(not TabStatusStore.getTabCloseFlag()):
            # set tab show/hide flag.
            TabStatusStore.setShowTabStatus(
                not TabStatusStore.getShowTabStatus())
        else:
            # force disable disable the tab control of the menu.
            return ('None')


class TabStatusStore():
    # show_tabs parameter from Session.sublime_session.
    _show_tab_status = {}

    # auto tab closing flag.
    _tab_close_flag = None

    @staticmethod
    def getActiveWindowId():
        return sublime.active_window().id()

    @classmethod
    def getShowTabStatus(store):
        # get active window_id
        window_id = store.getActiveWindowId()

        if(not window_id in store._show_tab_status):
            store._show_tab_status[window_id] = None

        return store._show_tab_status[window_id]

    @classmethod
    def setShowTabStatus(store, status):
        # get active window_id
        window_id = store.getActiveWindowId()

        # set show_tab_status.
        store._show_tab_status[window_id] = status

    @classmethod
    def getTabCloseFlag(store):
        return store._tab_close_flag

    @classmethod
    def setTabCloseFlag(store, flag):
        store._tab_close_flag = flag


class SidebarSeparator(TextCommand):

    def run(self, edit):
        # get setting values from setting file.
        setting_values = self.getSettingValues()

        # set separate data.
        separate_value = self.setSeparate(setting_values)

        # create separate file.
        separate_file = sublime.active_window().new_file()

        # set buffer name.
        separate_file.set_name(separate_value)

        # set not save as separate file propertie.
        separate_file.set_scratch(True)

        # set read only propertie.
        separate_file.set_read_only(True)
{'fraction_non_alphanumeric': 0.07317073170731707, 'fraction_numerical': 0.0, 'mean_word_length': 2.6340718105423986, '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': '723625', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1330, 'n_words': 325}