Skip to content

Commit b337f94

Browse files
committed
Add note to explain the cast
1 parent dea6acc commit b337f94

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pip/_internal/resolution/resolvelib/factory.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,8 @@ def get_installation_error(
456456
and not cause.requirement.is_satisfied_by(self._python_candidate)
457457
]
458458
if requires_python_causes:
459+
# The comprehension above makes sure all Requirement instances are
460+
# RequiresPythonRequirement, so let's cast for convinience.
459461
return self._report_requires_python_error(
460462
cast("Sequence[ConflictCause]", requires_python_causes),
461463
)

0 commit comments

Comments
 (0)