mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
commit
cba6083f92
5 changed files with 8 additions and 8 deletions
|
@ -729,7 +729,7 @@ def _merge_hash(option, opt_str, value, parser):
|
|||
"""Given a value spelled "algo:digest", append the digest to a list
|
||||
pointed to in a dict by the algo name."""
|
||||
if not parser.values.hashes:
|
||||
parser.values.hashes = {} # type: ignore
|
||||
parser.values.hashes = {}
|
||||
try:
|
||||
algo, digest = value.split(':', 1)
|
||||
except ValueError:
|
||||
|
|
|
@ -2,7 +2,7 @@ from __future__ import absolute_import
|
|||
|
||||
import logging
|
||||
import os
|
||||
from email.parser import FeedParser # type: ignore
|
||||
from email.parser import FeedParser
|
||||
|
||||
from pip._vendor import pkg_resources
|
||||
from pip._vendor.packaging.utils import canonicalize_name
|
||||
|
|
|
@ -216,7 +216,7 @@ class Configuration(object):
|
|||
ensure_dir(os.path.dirname(fname))
|
||||
|
||||
with open(fname, "w") as f:
|
||||
parser.write(f) # type: ignore
|
||||
parser.write(f)
|
||||
|
||||
#
|
||||
# Private routines
|
||||
|
|
|
@ -212,12 +212,12 @@ def message_about_scripts_not_on_PATH(scripts):
|
|||
# Format a message
|
||||
msg_lines = []
|
||||
for parent_dir, scripts in warn_for.items():
|
||||
scripts = sorted(scripts)
|
||||
if len(scripts) == 1:
|
||||
start_text = "script {} is".format(scripts[0])
|
||||
sorted_scripts = sorted(scripts) # type: List[str]
|
||||
if len(sorted_scripts) == 1:
|
||||
start_text = "script {} is".format(sorted_scripts[0])
|
||||
else:
|
||||
start_text = "scripts {} are".format(
|
||||
", ".join(scripts[:-1]) + " and " + scripts[-1]
|
||||
", ".join(sorted_scripts[:-1]) + " and " + sorted_scripts[-1]
|
||||
)
|
||||
|
||||
msg_lines.append(
|
||||
|
|
|
@ -1 +1 @@
|
|||
mypy == 0.650
|
||||
mypy == 0.670
|
||||
|
|
Loading…
Reference in a new issue