Remove py26 format literals

Resolves #403
This commit is contained in:
Anthony Sottile 2016-09-15 08:17:18 -07:00
parent 26e60fa333
commit b81c9802ae
28 changed files with 58 additions and 58 deletions

View file

@ -11,4 +11,4 @@ def environment_dir(ENVIRONMENT_DIR, language_version):
if ENVIRONMENT_DIR is None:
return None
else:
return '{0}-{1}'.format(ENVIRONMENT_DIR, language_version)
return '{}-{}'.format(ENVIRONMENT_DIR, language_version)

View file

@ -47,7 +47,7 @@ def install_environment(
with clean_path_on_failure(env_dir):
cmd = [
sys.executable, '-m', 'nodeenv', '--prebuilt',
'{{prefix}}{0}'.format(directory),
'{{prefix}}{}'.format(directory),
]
if version != 'default':

View file

@ -49,7 +49,7 @@ def norm_version(version):
# If it is in the form pythonx.x search in the default
# place on windows
if version.startswith('python'):
return r'C:\{0}\python.exe'.format(version.replace('.', ''))
return r'C:\{}\python.exe'.format(version.replace('.', ''))
# Otherwise assume it is a path
return os.path.expanduser(version)
@ -67,7 +67,7 @@ def install_environment(
with clean_path_on_failure(repo_cmd_runner.path(directory)):
venv_cmd = [
sys.executable, '-m', 'virtualenv',
'{{prefix}}{0}'.format(directory)
'{{prefix}}{}'.format(directory)
]
if version != 'default':
venv_cmd.extend(['-p', norm_version(version)])

View file

@ -70,20 +70,20 @@ def _install_rbenv(repo_cmd_runner, version='default'):
# We also modify the PS1 variable for manual debugging sake.
activate_file.write(
'#!/usr/bin/env bash\n'
"export RBENV_ROOT='{0}'\n"
"export RBENV_ROOT='{directory}'\n"
'export PATH="$RBENV_ROOT/bin:$PATH"\n'
'eval "$(rbenv init -)"\n'
'export PS1="(rbenv)$PS1"\n'
# This lets us install gems in an isolated and repeatable
# directory
"export GEM_HOME='{0}/gems'\n"
"export GEM_HOME='{directory}/gems'\n"
'export PATH="$GEM_HOME/bin:$PATH"\n'
'\n'.format(repo_cmd_runner.path(directory))
'\n'.format(directory=repo_cmd_runner.path(directory))
)
# If we aren't using the system ruby, add a version here
if version != 'default':
activate_file.write('export RBENV_VERSION="{0}"\n'.format(version))
activate_file.write('export RBENV_VERSION="{}"\n'.format(version))
def _install_ruby(runner, version):