47
47
48
48
C = TypeVar ("C" )
49
49
Cache = Dict [Link , C ]
50
+ VersionCandidates = Dict [_BaseVersion , Candidate ]
50
51
51
52
52
53
class Factory (object ):
@@ -130,8 +131,7 @@ def iter_found_candidates(self, ireq, extras):
130
131
# requirement needs to return only one candidate per version, so we
131
132
# implement that logic here so that requirements using this helper
132
133
# don't all have to do the same thing later.
133
- version_candidates = collections .OrderedDict (
134
- ) # type: Dict[_BaseVersion, Candidate]
134
+ candidates = collections .OrderedDict () # type: VersionCandidates
135
135
136
136
# Yield the installed version, if it matches, unless the user
137
137
# specified `--force-reinstall`, when we want the version from
@@ -149,7 +149,7 @@ def iter_found_candidates(self, ireq, extras):
149
149
extras = extras ,
150
150
parent = ireq ,
151
151
)
152
- version_candidates [installed_version ] = candidate
152
+ candidates [installed_version ] = candidate
153
153
154
154
found = self .finder .find_best_candidate (
155
155
project_name = ireq .req .name ,
@@ -166,9 +166,9 @@ def iter_found_candidates(self, ireq, extras):
166
166
name = name ,
167
167
version = ican .version ,
168
168
)
169
- version_candidates [ican .version ] = candidate
169
+ candidates [ican .version ] = candidate
170
170
171
- return six .itervalues (version_candidates )
171
+ return six .itervalues (candidates )
172
172
173
173
def make_requirement_from_install_req (self , ireq ):
174
174
# type: (InstallRequirement) -> Requirement
0 commit comments