Skip to content

Commit d924b16

Browse files
committed
Give mypy some love after rebase
1 parent fe56826 commit d924b16

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

src/pip/_internal/commands/install.py

+14-11
Original file line numberDiff line numberDiff line change
@@ -356,29 +356,32 @@ def run(self, options, args):
356356

357357
# If we're using PEP 517, we cannot do a direct install
358358
# so we fail here.
359-
pep517_build_failures = [
360-
r for r in build_failures if r.use_pep517
361-
]
362-
if pep517_build_failures:
359+
pep517_build_failure_names = [
360+
r.name # type: ignore
361+
for r in build_failures if r.use_pep517
362+
] # type: List[str]
363+
if pep517_build_failure_names:
363364
raise InstallationError(
364365
"Could not build wheels for {} which use"
365366
" PEP 517 and cannot be installed directly".format(
366-
", ".join(r.name # type: ignore
367-
for r in pep517_build_failures)))
367+
", ".join(pep517_build_failure_names)
368+
)
369+
)
368370

369371
# For now, we just warn about failures building legacy
370372
# requirements, as we'll fall through to a direct
371373
# install for those.
372-
legacy_build_failures = [
373-
r for r in build_failures if not r.use_pep517
374-
]
375-
if legacy_build_failures:
374+
legacy_build_failure_names = [
375+
r.name # type: ignore
376+
for r in build_failures if not r.use_pep517
377+
] # type: List[str]
378+
if legacy_build_failure_names:
376379
deprecated(
377380
reason=(
378381
"Could not build wheels for {} which do not use "
379382
"PEP 517. pip will fall back to legacy 'setup.py "
380383
"install' for these.".format(
381-
", ".join(r.name for r in legacy_build_failures)
384+
", ".join(legacy_build_failure_names)
382385
)
383386
),
384387
replacement="to fix the wheel build issue reported above",

0 commit comments

Comments
 (0)