<commit_before>import sys
from gitcd.Config.File import File as ConfigFile
from gitcd.Cli.Interface import Interface
from gitcd.Git.Git import Git
from gitcd.Git.Command import Command

class Gitcd(object):

  interface = Interface()
  config = ConfigFile()
  git = Git()

  def __init__(self):
    self.git.setConfig(self.config)
    self.git.setupCommands()

  def setConfigFilename(self, configFilename: str):
    self.config.setFilename(configFilename)

  def loadConfig(self):
    self.config.load()

  def getCommand(self, command: str):
    try:
      commandObject = self.git.commands[command]
    except:
      commandObject = Command()

    return commandObject

  def dispatch(self, command: str, action: str, branch: str):
    try:
      commandObject = self.git.commands[command]
    except:
      self.interface.error("Subcommand %s does not exists, see gitcd --help for more information." % command)
      sys.exit(1)
    
    try:
      subcommandMethod = getattr(commandObject, action)  
    except:
        self.interface.error("Action %s does not exists on subcommand %s, see gitcd --help for more information." % (action, command))
      sys.exit(1)

    # not sure if its really necessary to update everytime here, its good but takes some time
    self.git.update()
    subcommandMethod(branch)<commit_msg>Fix indention<commit_after>import sys
from gitcd.Config.File import File as ConfigFile
from gitcd.Cli.Interface import Interface
from gitcd.Git.Git import Git
from gitcd.Git.Command import Command

class Gitcd(object):

  interface = Interface()
  config = ConfigFile()
  git = Git()

  def __init__(self):
    self.git.setConfig(self.config)
    self.git.setupCommands()

  def setConfigFilename(self, configFilename: str):
    self.config.setFilename(configFilename)

  def loadConfig(self):
    self.config.load()

  def getCommand(self, command: str):
    try:
      commandObject = self.git.commands[command]
    except:
      commandObject = Command()

    return commandObject

  def dispatch(self, command: str, action: str, branch: str):
    try:
      commandObject = self.git.commands[command]
    except:
      self.interface.error("Subcommand %s does not exists, see gitcd --help for more information." % command)
      sys.exit(1)
    
    try:
      subcommandMethod = getattr(commandObject, action)  
    except:
      self.interface.error("Action %s does not exists on subcommand %s, see gitcd --help for more information." % (action, command))
      sys.exit(1)

    # not sure if its really necessary to update everytime here, its good but takes some time
    self.git.update()
    subcommandMethod(branch)
{'fraction_non_alphanumeric': 0.09803921568627451, 'fraction_numerical': 0.0015082956259426848, 'mean_word_length': 3.4364548494983276, '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': '4389365', 'n_tokens_mistral': 787, 'n_tokens_neox': 759, 'n_words': 234}