<commit_before>import os  # needed to start shell commands from python
import argparse  # parsing commandline arguments
import sys

import config  # import config.py file
import dataaccess  # class which is responsible for manipulating the commands_file


class CommandLine:
    def __init__(self, commands_file, action, command):
        self.action = action
        self.command = command
        self.command.insert(0, config.system)

        try:
            self.data_access = dataaccess.DataAccess(commands_file)
        except:
            raise

        cases = {"find": self.find_command,
                 "add": self.add_command,
                 "delete": self.del_command,
                 "run": self.run_command,
        }
        cases[action]()

    def find_command(self):
        print(self.data_access.find(self.command))

    def add_command(self):
        pass

    def del_command(self):
        pass

    def run_command(self):
        os.system(self.data_access.find(self.command))<commit_msg>Add fixes requested in comments<commit_after>import os  # needed to start shell commands from python
import argparse  # parsing commandline arguments
import sys

import config  # import config.py file
import dataaccess  # class which is responsible for manipulating the commands_file
import autoconfig                   #class which can determine some important things and create config file


class CommandLine:
    def __init__(self, commands_file, action, command):
        self.action = action
        self.command = command
        self.command.insert(0, config.system)

        try:
            self.data_access = dataaccess.DataAccess(commands_file)
        except:
            raise

        cases = {"find"   : self.find_command,
                 "add"    : self.add_command,
                 "delete" : self.del_command,
                 "run"    : self.run_command,
                }
        cases[action]()

    def find_command(self):
        print(self.data_access.find(self.command))

    def add_command(self):
        pass

    def del_command(self):
        pass

    def run_command(self):
        os.system(self.data_access.find(self.command))
{'fraction_non_alphanumeric': 0.07935779816513762, 'fraction_numerical': 0.0009174311926605505, 'mean_word_length': 2.3045454545454547, 'pattern_counts': {'":': 4, '<': 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': '5775982', 'n_tokens_mistral': 591, 'n_tokens_neox': 569, 'n_words': 158}