<commit_before>import Tkinter

# colors
bg_color = "black"
mid_color = "dimgrey"
fg_color = "grey"
bright_color = "white"

# fonts
headFont = ("Source Code Pro", 10, "bold")
bodyFont = ("Source Code Pro", 10)

# need to style the following:
# - Label
# - Text
# - Entry
# - Button
# - Notebook

xsms_style = "xsms"

style_applied = False


def configure(style):
    style_applied = True

    # style.theme_create(xsms_style, parent="alt")

    # style.configure("TLabel", foreground=fg_color, background=bg_color)
    # style.configure("TEntry", foreground=fg_color, background=bg_color)
    # style.configure("TButton", foreground=fg_color, background=bg_color)
    # style.configure("TNotebook", foreground=fg_color, background=bg_color)
    # style.configure("TFrame", foreground=fg_color, background=bg_color)
    style.configure(".", foreground=fg_color, background=bg_color)
    # style.configure(".", relief="flat")

    # style the notebook tabs
    style.configure("TNotebook", background=bg_color)
    style.map("TNotebook.Tab",
              background=[("selected", mid_color)],
              foreground=[("selected", bright_color)])
    style.configure("TNotebook.Tab", background=bg_color, foreground=fg_color)

    # style.theme_use(xsms_style)


def Text(parent, height, width):
    if style_applied:
        return Tkinter.Text(parent,
                            height=height,
                            width=width,
                            bg=bg_color,
                            fg=fg_color)

    return Tkinter.Text(parent, height=height, width=width)
<commit_msg>style_applied is used, but flake8 complains<commit_after>import Tkinter

# colors
bg_color = "black"
mid_color = "dimgrey"
fg_color = "grey"
bright_color = "white"

# fonts
headFont = ("Source Code Pro", 10, "bold")
bodyFont = ("Source Code Pro", 10)

# need to style the following:
# - Label
# - Text
# - Entry
# - Button
# - Notebook

xsms_style = "xsms"

# flake8: noqa
style_applied = False


def configure(style):
    style_applied = True

    # style.theme_create(xsms_style, parent="alt")

    # style.configure("TLabel", foreground=fg_color, background=bg_color)
    # style.configure("TEntry", foreground=fg_color, background=bg_color)
    # style.configure("TButton", foreground=fg_color, background=bg_color)
    # style.configure("TNotebook", foreground=fg_color, background=bg_color)
    # style.configure("TFrame", foreground=fg_color, background=bg_color)
    style.configure(".", foreground=fg_color, background=bg_color)
    # style.configure(".", relief="flat")

    # style the notebook tabs
    style.configure("TNotebook", background=bg_color)
    style.map("TNotebook.Tab",
              background=[("selected", mid_color)],
              foreground=[("selected", bright_color)])
    style.configure("TNotebook.Tab", background=bg_color, foreground=fg_color)

    # style.theme_use(xsms_style)


def Text(parent, height, width):
    if style_applied:
        return Tkinter.Text(parent,
                            height=height,
                            width=width,
                            bg=bg_color,
                            fg=fg_color)

    return Tkinter.Text(parent, height=height, width=width)

{'fraction_non_alphanumeric': 0.12542582842985445, 'fraction_numerical': 0.003096934035305048, 'mean_word_length': 3.2668428005284014, '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': '3044585', 'n_tokens_mistral': 1033, 'n_tokens_neox': 976, 'n_words': 195}