diff --git a/docs/html/reference/pip_cache.rst b/docs/html/reference/pip_cache.rst
index d56d1b016..8ad99f65c 100644
--- a/docs/html/reference/pip_cache.rst
+++ b/docs/html/reference/pip_cache.rst
@@ -2,7 +2,7 @@
.. _`pip cache`:
pip cache
-------------
+---------
.. contents::
diff --git a/docs/man/commands/cache.rst b/docs/man/commands/cache.rst
index b0241c813..8f8e197f9 100644
--- a/docs/man/commands/cache.rst
+++ b/docs/man/commands/cache.rst
@@ -1,8 +1,8 @@
:orphan:
-==========
+=========
pip-cache
-==========
+=========
Description
***********
diff --git a/src/pip/_internal/commands/__init__.py b/src/pip/_internal/commands/__init__.py
index 8507b6ef9..48e288ab3 100644
--- a/src/pip/_internal/commands/__init__.py
+++ b/src/pip/_internal/commands/__init__.py
@@ -66,7 +66,7 @@ commands_dict = OrderedDict([
)),
('cache', CommandInfo(
'pip._internal.commands.cache', 'CacheCommand',
- "Inspect and manage pip's caches.",
+ "Inspect and manage pip's cache.",
)),
('wheel', CommandInfo(
'pip._internal.commands.wheel', 'WheelCommand',
diff --git a/src/pip/_internal/commands/cache.py b/src/pip/_internal/commands/cache.py
index 80ea5c8f9..9a473aeef 100644
--- a/src/pip/_internal/commands/cache.py
+++ b/src/pip/_internal/commands/cache.py
@@ -20,12 +20,12 @@ logger = logging.getLogger(__name__)
class CacheCommand(Command):
"""
- Inspect and manage pip's caches.
+ Inspect and manage pip's cache.
Subcommands:
info:
- Show information about the caches.
+ Show information about the cache.
list:
List filenames of packages stored in the cache.
remove:
@@ -107,7 +107,7 @@ class CacheCommand(Command):
files = self._find_wheels(options, pattern)
if not files:
- logger.info('Nothing is currently cached.')
+ logger.info('Nothing cached.')
return
results = []
@@ -115,7 +115,7 @@ class CacheCommand(Command):
wheel = os.path.basename(filename)
size = filesystem.friendly_file_size(filename)
results.append(' - {} ({})'.format(wheel, size))
- logger.info('Current cache contents:\n')
+ logger.info('Cache contents:\n')
logger.info('\n'.join(sorted(results)))
def remove_cache_items(self, options, args):
@@ -133,7 +133,7 @@ class CacheCommand(Command):
for filename in files:
os.unlink(filename)
logger.debug('Removed %s', filename)
- logger.info('Removed %s files', len(files))
+ logger.info('Removed %s file(s)', len(files))
def purge_cache(self, options, args):
# type: (Values, List[Any]) -> None
diff --git a/tests/functional/test_cache.py b/tests/functional/test_cache.py
index 745a6e2a7..642630b20 100644
--- a/tests/functional/test_cache.py
+++ b/tests/functional/test_cache.py
@@ -15,7 +15,7 @@ def test_cache_info(script, monkeypatch):
result = script.pip('cache', 'info')
cache_dir = _cache_dir(script)
- assert 'Location: %s' % cache_dir in result.stdout
+ assert 'Location: {}'.format(cache_dir) in result.stdout
# TODO(@duckinator): This should probably test that the number of
# packages is actually correct, but I'm not sure how to do that
# without pretty much re-implementing the entire cache info command.