File tree 1 file changed +7
-4
lines changed
src/pip/_internal/resolution/resolvelib 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,11 @@ def _get_ireq(
72
72
candidate : Candidate ,
73
73
direct_url_requested : bool ,
74
74
) -> Optional [InstallRequirement ]:
75
+ """Get the InstallRequirement to install for a candidate.
76
+
77
+ Returning None means the candidate is already satisfied by the current
78
+ environment state and does not need to be handled.
79
+ """
75
80
ireq = candidate .get_install_requirement ()
76
81
77
82
# No ireq to install (e.g. extra-ed candidate). Skip.
@@ -111,10 +116,8 @@ def _get_ireq(
111
116
# Determine whether to upgrade based on flags and whether the installed
112
117
# distribution was done via a direct URL.
113
118
114
- # Always reinstall an incoming wheel candidate on the local filesystem.
115
- # This is quite fast anyway, and we can avoid drama when users want
116
- # their in-development direct URL requirement automatically reinstalled.
117
- if cand_link .is_file and cand_link .is_wheel :
119
+ # Always reinstall a direct candidate if it's on the local file system.
120
+ if cand_link .is_file :
118
121
return ireq
119
122
120
123
# Reinstall if --upgrade is specified.
You can’t perform that action at this time.
0 commit comments