<commit_before>import re
from collections import namedtuple

Stash = namedtuple("Stash", ("id", "description"))


class StashMixin():

    def get_stashes(self):
        """
        Return a list of stashes in the repo.
        """
        stdout = self.git("stash", "list")
        stashes = []
        for entry in stdout.split("\n"):
            if not entry:
                continue
            num, _, description = re.match("^stash@\\{(\\d+)}: (.*?: )?(.*)", entry).groups()
            stashes.append(Stash(num, description))
        return stashes

    def apply_stash(self, id):
        """
        Apply stash with provided id.
        """
        self.git("stash", "apply", "stash@{{{}}}".format(id))

    def pop_stash(self, id):
        """
        Pop stash with provided id.
        """
        self.git("stash", "pop", "stash@{{{}}}".format(id))

    def create_stash(self, description, include_untracked=False):
        """
        Create stash with provided description from working files.
        """
        self.git("stash", "save", "-u" if include_untracked else None, description)

    def drop_stash(self, id):
        """
        Drop stash with provided id.
        """
        self.git("stash", "drop", "stash@{{{}}}".format(id))<commit_msg>add -k to git stash command<commit_after>import re
from collections import namedtuple

Stash = namedtuple("Stash", ("id", "description"))


class StashMixin():

    def get_stashes(self):
        """
        Return a list of stashes in the repo.
        """
        stdout = self.git("stash", "list")
        stashes = []
        for entry in stdout.split("\n"):
            if not entry:
                continue
            num, _, description = re.match("^stash@\\{(\\d+)}: (.*?: )?(.*)", entry).groups()
            stashes.append(Stash(num, description))
        return stashes

    def apply_stash(self, id):
        """
        Apply stash with provided id.
        """
        self.git("stash", "apply", "stash@{{{}}}".format(id))

    def pop_stash(self, id):
        """
        Pop stash with provided id.
        """
        self.git("stash", "pop", "stash@{{{}}}".format(id))

    def create_stash(self, description, include_untracked=False):
        """
        Create stash with provided description from working files.
        """
        self.git("stash", "save", "-k", "-u" if include_untracked else None, description)

    def drop_stash(self, id):
        """
        Drop stash with provided id.
        """
        self.git("stash", "drop", "stash@{{{}}}".format(id))
{'fraction_non_alphanumeric': 0.16770914777169663, 'fraction_numerical': 0.0, 'mean_word_length': 2.155363748458693, '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': '3066368', 'n_tokens_mistral': 789, 'n_tokens_neox': 772, 'n_words': 195}