old_contents: # -*- coding: utf-8 -*-
  from __future__ import absolute_import, division, print_function
  
  import click
  import sys
  
  from polyaxon_client.exceptions import PolyaxonHTTPError, PolyaxonShouldExitError
  
  from polyaxon_cli.cli.project import get_current_project_or_exit
  from polyaxon_cli.managers.ignore import IgnoreManager
  from polyaxon_cli.utils.clients import PolyaxonClients
  from polyaxon_cli.utils.files import create_tarfile, get_files_in_current_directory
  from polyaxon_cli.utils.formatting import Printer
  
  
  @click.command()
  def upload():
      """Upload code for current set project."""
      project = get_current_project_or_exit()
      files = IgnoreManager.get_unignored_file_paths()
      filepath = create_tarfile(files, project.name)
      files, files_size = get_files_in_current_directory('repo', [filepath])
      try:
          PolyaxonClients().project.upload_repo(project.user, project.name, files, files_size)
      except (PolyaxonHTTPError, PolyaxonShouldExitError) as e:
          Printer.print_error('Could not upload code for project `{}`.'.format(project))
          Printer.print_error('Error message `{}`.'.format(e))
          sys.exit(1)
      Printer.print_success('Files upload.')
  
new_contents: # -*- coding: utf-8 -*-
  from __future__ import absolute_import, division, print_function
  
  import click
  import sys
  
  from polyaxon_client.exceptions import PolyaxonHTTPError, PolyaxonShouldExitError
  
  from polyaxon_cli.cli.project import get_current_project_or_exit
  from polyaxon_cli.managers.ignore import IgnoreManager
  from polyaxon_cli.utils.clients import PolyaxonClients
  from polyaxon_cli.utils.files import create_tarfile, get_files_in_current_directory
  from polyaxon_cli.utils.formatting import Printer
  
  
  @click.command()
  def upload():
      """Upload code of the current directory while respecting the .polyaxonignore file."""
      project = get_current_project_or_exit()
      files = IgnoreManager.get_unignored_file_paths()
      filepath = create_tarfile(files, project.name)
      files, files_size = get_files_in_current_directory('repo', [filepath])
      try:
          PolyaxonClients().project.upload_repo(project.user, project.name, files, files_size)
      except (PolyaxonHTTPError, PolyaxonShouldExitError) as e:
          Printer.print_error('Could not upload code for project `{}`.'.format(project))
          Printer.print_error('Error message `{}`.'.format(e))
          sys.exit(1)
      Printer.print_success('Files upload.')
  
subject: Fix docstring