1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Merge pull request #6287 from mkurnikov/mypy-670

Update mypy to 0.670
This commit is contained in:
Pradyun Gedam 2019-02-22 07:17:54 +05:30 committed by GitHub
commit cba6083f92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 8 deletions

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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(

View file

@ -1 +1 @@
mypy == 0.650
mypy == 0.670