"""Relocate a virtual environment."""

from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

import argparse

from .. import api


def relocate(source, destination, move=False):
    """Adjust the virtual environment settings and optional move it.

    Args:
        source (str): Path to the existing virtual environment.
        destination (str): Desired path of the virtual environment.
        move (bool): Whether or not to actually move the files. Default False.
    """
    venv = api.VirtualEnvironment(source)
    if not move:

        venv.relocate(destination)
        return None

    venv.move(destination)


def main():
    """Relocate a virtual environment."""
    parser = argparse.ArgumentParser(
        description='Relocate a virtual environment.'
    )
    parser.add_argument(
        '--source',
        help='The existing virtual environment.',
        required=True,
    )
    parser.add_argument(
        '--destination',
        help='The location for which to configure the virtual environment.',
        required=True,
    )
    parser.add_argument(
        '--move',
        help='Move the virtual environment to the destination.',
        default=False,
        action='store_true',
    )

    args = parser.parse_args()
    relocate(args.source, args.destination, args.move)


if __name__ == '__main__':

    main()

"""Relocate a virtual environment."""

from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

import argparse

from .. import api


def relocate(source, destination, move=False):
    """Adjust the virtual environment settings and optional move it.

    Args:
        source (str): Path to the existing virtual environment.
        destination (str): Desired path of the virtual environment.
        move (bool): Whether or not to actually move the files. Default False.
    """
    venv = api.VirtualEnvironment(source)
    if not move:

        venv.relocate(destination)
        return None

    venv.move(destination)
    return None


def main():
    """Relocate a virtual environment."""
    parser = argparse.ArgumentParser(
        description='Relocate a virtual environment.'
    )
    parser.add_argument(
        '--source',
        help='The existing virtual environment.',
        required=True,
    )
    parser.add_argument(
        '--destination',
        help='The location for which to configure the virtual environment.',
        required=True,
    )
    parser.add_argument(
        '--move',
        help='Move the virtual environment to the destination.',
        default=False,
        action='store_true',
    )

    args = parser.parse_args()
    relocate(args.source, args.destination, args.move)


if __name__ == '__main__':

    main()

Fix cli module for new lint detection
Fix cli module for new lint detection

Since the last commit (2015), some of the test dependencies have
updated. This commit specifically addresses updates in PyLint which
result in more lint being detected in the project that previous test
runs.

  """Relocate a virtual environment."""
  
  from __future__ import division
  from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import unicode_literals
  
  import argparse
  
  from .. import api
  
  
  def relocate(source, destination, move=False):
      """Adjust the virtual environment settings and optional move it.
  
      Args:
          source (str): Path to the existing virtual environment.
          destination (str): Desired path of the virtual environment.
          move (bool): Whether or not to actually move the files. Default False.
      """
      venv = api.VirtualEnvironment(source)
      if not move:
  
          venv.relocate(destination)
          return None
  
      venv.move(destination)
+     return None
  
  
  def main():
      """Relocate a virtual environment."""
      parser = argparse.ArgumentParser(
          description='Relocate a virtual environment.'
      )
      parser.add_argument(
          '--source',
          help='The existing virtual environment.',
          required=True,
      )
      parser.add_argument(
          '--destination',
          help='The location for which to configure the virtual environment.',
          required=True,
      )
      parser.add_argument(
          '--move',
          help='Move the virtual environment to the destination.',
          default=False,
          action='store_true',
      )
  
      args = parser.parse_args()
      relocate(args.source, args.destination, args.move)
  
  
  if __name__ == '__main__':
  
      main()
  
Fix cli module for new lint detection
## Code Before:
"""Relocate a virtual environment."""

from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

import argparse

from .. import api


def relocate(source, destination, move=False):
    """Adjust the virtual environment settings and optional move it.

    Args:
        source (str): Path to the existing virtual environment.
        destination (str): Desired path of the virtual environment.
        move (bool): Whether or not to actually move the files. Default False.
    """
    venv = api.VirtualEnvironment(source)
    if not move:

        venv.relocate(destination)
        return None

    venv.move(destination)


def main():
    """Relocate a virtual environment."""
    parser = argparse.ArgumentParser(
        description='Relocate a virtual environment.'
    )
    parser.add_argument(
        '--source',
        help='The existing virtual environment.',
        required=True,
    )
    parser.add_argument(
        '--destination',
        help='The location for which to configure the virtual environment.',
        required=True,
    )
    parser.add_argument(
        '--move',
        help='Move the virtual environment to the destination.',
        default=False,
        action='store_true',
    )

    args = parser.parse_args()
    relocate(args.source, args.destination, args.move)


if __name__ == '__main__':

    main()

## Instruction:
Fix cli module for new lint detection
## Code After:
"""Relocate a virtual environment."""

from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

import argparse

from .. import api


def relocate(source, destination, move=False):
    """Adjust the virtual environment settings and optional move it.

    Args:
        source (str): Path to the existing virtual environment.
        destination (str): Desired path of the virtual environment.
        move (bool): Whether or not to actually move the files. Default False.
    """
    venv = api.VirtualEnvironment(source)
    if not move:

        venv.relocate(destination)
        return None

    venv.move(destination)
    return None


def main():
    """Relocate a virtual environment."""
    parser = argparse.ArgumentParser(
        description='Relocate a virtual environment.'
    )
    parser.add_argument(
        '--source',
        help='The existing virtual environment.',
        required=True,
    )
    parser.add_argument(
        '--destination',
        help='The location for which to configure the virtual environment.',
        required=True,
    )
    parser.add_argument(
        '--move',
        help='Move the virtual environment to the destination.',
        default=False,
        action='store_true',
    )

    args = parser.parse_args()
    relocate(args.source, args.destination, args.move)


if __name__ == '__main__':

    main()
