mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Merge pull request #1778 from alex/typo-fixes
Resolve several typos in the codebase
This commit is contained in:
commit
5ad52827c9
|
@ -69,7 +69,7 @@ class PrettyHelpFormatter(optparse.IndentedHelpFormatter):
|
|||
label = 'Commands'
|
||||
else:
|
||||
label = 'Description'
|
||||
# some doc strings have inital newlines, some don't
|
||||
# some doc strings have initial newlines, some don't
|
||||
description = description.lstrip('\n')
|
||||
# some doc strings have final newlines and spaces, some don't
|
||||
description = description.rstrip()
|
||||
|
|
|
@ -162,7 +162,7 @@ class RequirementSet(object):
|
|||
req_to_install.check_if_exists()
|
||||
if req_to_install.satisfied_by:
|
||||
if self.upgrade:
|
||||
# don't uninstall conflict if user install and and
|
||||
# don't uninstall conflict if user install and
|
||||
# conflict is not user install
|
||||
if not (self.use_user_site
|
||||
and not dist_in_usersite(
|
||||
|
@ -313,11 +313,11 @@ class RequirementSet(object):
|
|||
elif os.path.exists(os.path.join(location, 'setup.py')):
|
||||
raise PreviousBuildDirError(
|
||||
"pip can't proceed with requirements '%s' due to a"
|
||||
" pre-existing buld directory (%s). This is likely"
|
||||
" due to a previous installation that failed. pip "
|
||||
"is being responsible and not assuming it can "
|
||||
"delete this. Please delete it and try again." %
|
||||
(req_to_install, location)
|
||||
" pre-existing build directory (%s). This is "
|
||||
"likely due to a previous installation that failed"
|
||||
". pip is being responsible and not assuming it "
|
||||
"can delete this. Please delete it and try again."
|
||||
% (req_to_install, location)
|
||||
)
|
||||
else:
|
||||
# FIXME: this won't upgrade when there's an existing
|
||||
|
|
10
pip/util.py
10
pip/util.py
|
@ -558,7 +558,7 @@ def untar_file(filename, location):
|
|||
mode = 'r:*'
|
||||
tar = tarfile.open(filename, mode)
|
||||
try:
|
||||
# note: python<=2.5 doesnt seem to know about pax headers, filter them
|
||||
# note: python<=2.5 doesn't seem to know about pax headers, filter them
|
||||
leading = has_leading_dir([
|
||||
member.name for member in tar.getmembers()
|
||||
if member.name != 'pax_global_header'
|
||||
|
@ -756,10 +756,10 @@ def is_prerelease(vers):
|
|||
def read_text_file(filename):
|
||||
"""Return the contents of *filename*.
|
||||
|
||||
Try to decode the file contents with utf-8, the preffered system encoding
|
||||
(e.g., cp1252 on some Windows machines) and latin1, in that order. Decoding
|
||||
a byte string with latin1 will never raise an error. In the worst case, the
|
||||
returned string will contain some garbage characters.
|
||||
Try to decode the file contents with utf-8, the preferred system encoding
|
||||
(e.g., cp1252 on some Windows machines), and latin1, in that order.
|
||||
Decoding a byte string with latin1 will never raise an error. In the worst
|
||||
case, the returned string will contain some garbage characters.
|
||||
|
||||
"""
|
||||
with open(filename, 'rb') as fp:
|
||||
|
|
|
@ -565,7 +565,7 @@ class WheelBuilder(object):
|
|||
build_failure.append(req)
|
||||
logger.indent -= 2
|
||||
|
||||
# notify sucess/failure
|
||||
# notify success/failure
|
||||
if build_success:
|
||||
logger.notify(
|
||||
'Successfully built %s' %
|
||||
|
|
|
@ -163,7 +163,7 @@ if __name__ == "__main__":
|
|||
|
||||
tmpdir = tempfile.mkdtemp()
|
||||
try:
|
||||
# Get a temporary path to use as as staging for the pip zip
|
||||
# Get a temporary path to use as staging for the pip zip
|
||||
zpth = os.path.join(tmpdir, "pip.zip")
|
||||
|
||||
# Write the pip files to the zip archive
|
||||
|
|
|
@ -57,7 +57,7 @@ def _test_env_vars_override_config_file(script, virtualenv, config_file):
|
|||
# set this to make pip load it
|
||||
script.environ['PIP_CONFIG_FILE'] = config_file
|
||||
# It's important that we test this particular config value ('no-index')
|
||||
# because their is/was a bug which only shows up in cases in which
|
||||
# because there is/was a bug which only shows up in cases in which
|
||||
# 'config-item' and 'config_item' hash to the same value modulo the size
|
||||
# of the config dictionary.
|
||||
(script.scratch_path / config_file).write(textwrap.dedent("""\
|
||||
|
|
|
@ -153,7 +153,7 @@ def test_run_method_should_return_no_matches_found_when_does_not_find_pkgs():
|
|||
options_mock = Mock()
|
||||
options_mock.index = 'https://pypi.python.org/pypi'
|
||||
search_cmd = SearchCommand()
|
||||
status = search_cmd.run(options_mock, ('non-existant-package',))
|
||||
status = search_cmd.run(options_mock, ('non-existent-package',))
|
||||
assert status == NO_MATCHES_FOUND, status
|
||||
|
||||
|
||||
|
@ -169,5 +169,5 @@ def test_search_exit_status_code_when_finds_no_package(script):
|
|||
"""
|
||||
Test search exit status code for no matches
|
||||
"""
|
||||
result = script.pip('search', 'non-existant-package', expect_error=True)
|
||||
result = script.pip('search', 'non-existent-package', expect_error=True)
|
||||
assert result.returncode == NO_MATCHES_FOUND, result.returncode
|
||||
|
|
|
@ -52,7 +52,7 @@ def test_finder_detects_latest_find_links(data):
|
|||
|
||||
|
||||
def test_finder_detects_latest_already_satisfied_find_links(data):
|
||||
"""Test PackageFinder detects latest already satisified using find-links"""
|
||||
"""Test PackageFinder detects latest already satisfied using find-links"""
|
||||
req = InstallRequirement.from_line('simple', None)
|
||||
# the latest simple in local pkgs is 3.0
|
||||
latest_version = "3.0"
|
||||
|
@ -69,7 +69,7 @@ def test_finder_detects_latest_already_satisfied_find_links(data):
|
|||
|
||||
|
||||
def test_finder_detects_latest_already_satisfied_pypi_links():
|
||||
"""Test PackageFinder detects latest already satisified using pypi links"""
|
||||
"""Test PackageFinder detects latest already satisfied using pypi links"""
|
||||
req = InstallRequirement.from_line('initools', None)
|
||||
# the latest initools on pypi is 0.3.1
|
||||
latest_version = "0.3.1"
|
||||
|
|
Loading…
Reference in a new issue