<commit_before>class Character(object):
    """
    Creates the generic attributes for our characters. Stores all of the
    variables such as name, current room, and authentication status. Also,
    contains all of the necessary methods that the character will need.
    """

    def __init__(self):
        # Creates generic attributes for the character

        self.name = "unknown"
        self.menu_level = 0
        self.room = "Phoenix Tavern"
        self.authenticated = False
        self.muted_players = []
        self.afk_status = False
        self.gold = 0
        self.level = 1
        self.exp = 0
        self.inventory = []

    def __str__(self):
        # Define the default string representation of the warrior class

        return ("%s is a lvl %d %s with %d health. \nPlease..no touching the %s.") % (self.name,self.level,
                                                        self.type,self.health,self.type)

    def get_items(self):
        # Iterate through the characters items and display them to the console.
        inventoryList = []    # create an empty list to hold each item
        # handles if the inventory is empty
        if not self.inventory:

            return ["nothing but air"]

        else:
            # iterates through the list which holds dictionary items
            for item in self.inventory:
                # append each dictionary key which is a string of the item
                inventoryList.append(item.name)
            # return a string of the items list separated by a comma and a space
            return inventoryList

class Warrior(Character):
    """
    Creates the Warrior class which inherits all of the properties from the
    Character class.
    """<commit_msg>Added the item quantity during inventory listing.<commit_after>class Character(object):
    """
    Creates the generic attributes for our characters. Stores all of the
    variables such as name, current room, and authentication status. Also,
    contains all of the necessary methods that the character will need.
    """

    def __init__(self):
        # Creates generic attributes for the character

        self.name = "unknown"
        self.menu_level = 0
        self.room = "Phoenix Tavern"
        self.authenticated = False
        self.muted_players = []
        self.afk_status = False
        self.gold = 0
        self.level = 1
        self.exp = 0
        self.inventory = []

    def __str__(self):
        # Define the default string representation of the warrior class

        return ("%s is a lvl %d %s with %d health. \nPlease..no touching the %s.") % (self.name,self.level,
                                                        self.type,self.health,self.type)

    def get_items(self):
        # Iterate through the characters items and display them to the console.
        inventoryList = []    # create an empty list to hold each item
        # handles if the inventory is empty
        if not self.inventory:

            return ["nothing but air"]

        else:
            # iterates through the list which holds dictionary items
            for item in self.inventory:
                # append each dictionary key which is a string of the item
                inventoryList.append("%s[%d]" % item.name,item.quantity)
            # return a string of the items list separated by a comma and a space
            return inventoryList

class Warrior(Character):
    """
    Creates the Warrior class which inherits all of the properties from the
    Character class.
    """
{'fraction_non_alphanumeric': 0.06822667042571187, 'fraction_numerical': 0.002255427121511136, 'mean_word_length': 1.9991546914623837, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7075830', 'n_tokens_mistral': 889, 'n_tokens_neox': 852, 'n_words': 367}