<commit_before>import os
import json
from pathlib import Path
from direct.interval.IntervalGlobal import Sequence, Func, Wait
from direct.gui.DirectGui import *

class Menu(object):
    def __init__(self):
        self.parentNode = None
        self.popupText = None
        self.popupSeq = None
        self.nameEntry = None
        self.slot1Button = None
        self.slot2Button = None
        self.slot3Button = None
        self.slot4Button = None
        self.backButton = None
        self.background = None

        self.guiElements = []

    def disableGUI(self):
        for element in self.guiElements:
            element['state'] = DGG.DISABLED
    def enableGUI(self):
        for element in self.guiElements:
            element["state"] = DGG.NORMAL

    def switchToMainMenu(self):
        base.gameFSM.demand('StartMenu')

    def switchToSave(self):
        base.gameFSM.demand('Save')

    def switchToLoad(self):
        base.gameFSM.demand('Load')

    def switchToControls(self):
        base.gameFSM.demand('Controls')

    def switchToStats(self):
        if base.currPlayer.hasName():
            base.gameFSM.demand('Stats')
        else:
            s = 'No save data found. Press Train to make a character, or load a save file.'
            self.drawPopupText(s)

    def clearText(self):
        self.nameEntry.enterText('')
<commit_msg>can always get to stats now<commit_after>import os
import json
from pathlib import Path
from direct.interval.IntervalGlobal import Sequence, Func, Wait
from direct.gui.DirectGui import *

class Menu(object):
    def __init__(self):
        self.parentNode = None
        self.popupText = None
        self.popupSeq = None
        self.nameEntry = None
        self.slot1Button = None
        self.slot2Button = None
        self.slot3Button = None
        self.slot4Button = None
        self.backButton = None
        self.background = None

        self.guiElements = []

    def disableGUI(self):
        for element in self.guiElements:
            element['state'] = DGG.DISABLED
    def enableGUI(self):
        for element in self.guiElements:
            element["state"] = DGG.NORMAL

    def switchToMainMenu(self):
        base.gameFSM.demand('StartMenu')

    def switchToSave(self):
        base.gameFSM.demand('Save')

    def switchToLoad(self):
        base.gameFSM.demand('Load')

    def switchToControls(self):
        base.gameFSM.demand('Controls')

    def switchToStats(self):
        if base.player1.hasName() or base.player2.hasName():
            base.gameFSM.demand('Stats')
        else:
            s = 'No save data found. Press Train to make a character, or load a save file.'
            self.drawPopupText(s)

    def clearText(self):
        self.nameEntry.enterText('')

{'fraction_non_alphanumeric': 0.09592499098449332, 'fraction_numerical': 0.003606202668589975, 'mean_word_length': 2.3181818181818183, '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': '6759977', 'n_tokens_mistral': 809, 'n_tokens_neox': 788, 'n_words': 199}