removed unused vars and imports

This commit is contained in:
Hugo Lopes Tavares 2010-06-03 21:58:16 -03:00
parent 26a1314d1d
commit ab3ea6ec51
17 changed files with 19 additions and 36 deletions

View File

@ -78,7 +78,6 @@ class Command(object):
if args and args[-1] == '___VENV_RESTART___':
## FIXME: We don't do anything this this value yet:
venv_location = args[-2]
args = args[:-2]
options.venv = None
else:

View File

@ -254,7 +254,6 @@ class PackageFinder(object):
if link.egg_fragment:
egg_info = link.egg_fragment
else:
path = link.path
egg_info, ext = link.splitext()
if not ext:
if link not in self.logged_links:

View File

@ -18,7 +18,7 @@ __all__ = ['rmtree', 'display_path', 'backup_dir',
'url_to_path', 'path_to_url',
'path_to_url2', 'normalize_name',
'format_size', 'is_url', 'is_installable_dir', 'is_archive_file',
'strip_prefix', 'is_svn_page', 'file_contents',
'is_svn_page', 'file_contents',
'split_leading_dir', 'has_leading_dir',
'make_path_relative', 'normalize_path',
'get_file_content', 'renames', 'get_terminal_size']

View File

@ -125,7 +125,6 @@ class Bazaar(VersionControl):
if current_rev in tag_revs:
# It's a tag
tag = tag_revs.get(current_rev, current_rev)
full_egg_name = '%s-%s' % (egg_project_name, tag_revs[current_rev])
else:
full_egg_name = '%s-dev_r%s' % (dist.egg_name(), current_rev)

View File

@ -106,7 +106,6 @@ class Subversion(VersionControl):
[self.cmd, 'checkout', '-q'] + rev_options + [url, dest])
def get_location(self, dist, dependency_links):
egg_fragment_re = re.compile(r'#egg=(.*)$')
for url in dependency_links:
egg_fragment = Link(url).egg_fragment
if not egg_fragment:

View File

@ -1,5 +1,4 @@
from setuptools import setup, find_packages
import sys, os
version = '0.1'

View File

@ -2,7 +2,6 @@
# Author: Aziz Köksal
import os
import shutil
import sys
_base = os.path.supports_unicode_filenames and unicode or str

View File

@ -1,4 +1,4 @@
from os.path import abspath, exists, join, dirname, curdir, pardir
from os.path import abspath, join, dirname, curdir, pardir
from test_pip import here, reset_env, run_pip, pyversion, mkdir
from path import Path
@ -74,7 +74,7 @@ def test_install_editable_from_svn():
Test checking out from svn.
"""
e = reset_env()
reset_env()
result = run_pip('install', '-e', 'svn+http://svn.colorstudy.com/INITools/trunk#egg=initools-dev')
result.assert_installed('INITools', with_files=['.svn'])
@ -159,7 +159,7 @@ def test_install_editable_from_git():
Test cloning from Git.
"""
e = reset_env()
reset_env()
result = run_pip('install', '-e', 'git://github.com/jezdez/django-feedutil.git#egg=django-feedutil', expect_error=True)
result.assert_installed('django-feedutil', with_files=['.git'])
@ -169,7 +169,7 @@ def test_install_editable_from_hg():
Test cloning from Mercurial.
"""
e = reset_env()
reset_env()
result = run_pip('install', '-e', 'hg+http://bitbucket.org/ubernostrum/django-registration/#egg=django-registration', expect_error=True)
result.assert_installed('django-registration', with_files=['.hg'])
@ -189,7 +189,7 @@ def test_install_editable_from_bazaar():
Test checking out from Bazaar.
"""
e = reset_env()
reset_env()
result = run_pip('install', '-e', 'bzr+http://bazaar.launchpad.net/%7Edjango-wikiapp/django-wikiapp/release-0.1/@174#egg=django-wikiapp', expect_error=True)
result.assert_installed('django-wikiapp', with_files=['.bzr'])

View File

@ -1,6 +1,6 @@
import zipfile
import textwrap
from os.path import abspath, join, dirname, pardir
from os.path import join
from test_pip import here, reset_env, run_pip, write_file
from path import Path
from pip.util import path_to_url2
@ -15,7 +15,7 @@ def test_create_bundle():
"""
env = reset_env()
fspkg = path_to_url2(Path(here)/'packages'/'FSPkg')
dummy = run_pip('install', '-e', fspkg)
run_pip('install', '-e', fspkg)
pkg_lines = textwrap.dedent('''\
-e %s
-e svn+http://svn.colorstudy.com/INITools/trunk#egg=initools-dev

View File

@ -1,8 +1,6 @@
import zipfile
import textwrap
from os.path import abspath, exists, join
from test_pip import here, reset_env, run_pip, write_file
from path import Path
def test_cleanup_after_install_from_pypi():
@ -11,7 +9,7 @@ def test_cleanup_after_install_from_pypi():
"""
env = reset_env()
result = run_pip('install', 'INITools==0.2', expect_error=True)
run_pip('install', 'INITools==0.2', expect_error=True)
build = env.scratch_path/"build"
src = env.scratch_path/"src"
assert not exists(build), "build/ dir still exists: %s" % build
@ -24,7 +22,7 @@ def test_cleanup_after_install_editable_from_hg():
"""
env = reset_env()
result = run_pip('install', '-e', 'hg+http://bitbucket.org/ubernostrum/django-registration/#egg=django-registration', expect_error=True)
run_pip('install', '-e', 'hg+http://bitbucket.org/ubernostrum/django-registration/#egg=django-registration', expect_error=True)
build = env.venv_path/'build'
src = env.venv_path/'src'
assert not exists(build), "build/ dir still exists: %s" % build
@ -38,7 +36,7 @@ def test_cleanup_after_install_from_local_directory():
"""
env = reset_env()
to_install = abspath(join(here, 'packages', 'FSPkg'))
result = run_pip('install', to_install, expect_error=False)
run_pip('install', to_install, expect_error=False)
build = env.venv_path/'build'
src = env.venv_path/'src'
assert not exists(build), "unexpected build/ dir exists: %s" % build
@ -52,7 +50,7 @@ def test_cleanup_after_create_bundle():
"""
env = reset_env()
# Install an editable to create a src/ dir.
dummy = run_pip('install', '-e', 'git://github.com/jezdez/django-feedutil.git#egg=django-feedutil')
run_pip('install', '-e', 'git://github.com/jezdez/django-feedutil.git#egg=django-feedutil')
build = env.venv_path/"build"
src = env.venv_path/"src"
assert not exists(build), "build/ dir still exists: %s" % build
@ -65,7 +63,7 @@ def test_cleanup_after_create_bundle():
-e svn+http://svn.colorstudy.com/INITools/trunk#egg=initools-dev
pip''' % fspkg)
write_file('bundle-req.txt', pkg_lines)
result = run_pip('bundle', '-r', 'bundle-req.txt', 'test.pybundle')
run_pip('bundle', '-r', 'bundle-req.txt', 'test.pybundle')
build_bundle = env.scratch_path/"build-bundle"
src_bundle = env.scratch_path/"src-bundle"
assert not exists(build_bundle), "build-bundle/ dir still exists: %s" % build_bundle

View File

@ -1,7 +1,7 @@
import os
import tempfile
import textwrap
from test_pip import here, reset_env, run_pip, clear_environ, write_file
import os
from test_pip import reset_env, run_pip, clear_environ, write_file
def test_options_from_env_vars():

View File

@ -1,7 +1,5 @@
from os import makedirs
from os.path import join
import textwrap
from test_pip import here, reset_env, run_pip, pyversion, write_file
from test_pip import reset_env, run_pip, write_file
from path import Path

View File

@ -1,9 +1,8 @@
import os
import sys
import re
import textwrap
from doctest import OutputChecker, ELLIPSIS
from test_pip import reset_env, run_pip, pyversion, write_file, get_env
from test_pip import reset_env, run_pip, write_file, get_env
distribute_re = re.compile('^distribute==[0-9.]+\n', re.MULTILINE)

View File

@ -411,7 +411,6 @@ def assert_all_changes(start_state, end_state, expected_changes):
diff = diff_states(start_files, end_files, ignore=expected_changes)
if diff.values() != [{}, {}, {}]:
import pprint
raise TestFailure('Unexpected changes:\n' + '\n'.join(
[k + ': ' + ', '.join(v.keys()) for k, v in diff.items()]))

View File

@ -1,5 +1,3 @@
import os
import textwrap
from test_pip import reset_env, run_pip, write_file, pyversion

View File

@ -1,11 +1,8 @@
import textwrap
import sys
from os.path import join
from tempfile import mkdtemp
from test_pip import here, reset_env, run_pip, get_env, assert_all_changes, write_file
from path import Path
import pprint
from test_pip import reset_env, run_pip, assert_all_changes, write_file
def test_simple_uninstall():

View File

@ -1,7 +1,7 @@
from os.path import join
import textwrap
from test_pip import here, reset_env, run_pip, get_env, assert_all_changes, write_file
from test_pip import here, reset_env, run_pip, assert_all_changes, write_file
def test_no_upgrade_unless_requested():