Skip to content

Commit f391346

Browse files
committed
Avoid the horrendous line break for type hints
1 parent ec86cb1 commit f391346

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747

4848
C = TypeVar("C")
4949
Cache = Dict[Link, C]
50+
VersionCandidates = Dict[_BaseVersion, Candidate]
5051

5152

5253
class Factory(object):
@@ -130,8 +131,7 @@ def iter_found_candidates(self, ireq, extras):
130131
# requirement needs to return only one candidate per version, so we
131132
# implement that logic here so that requirements using this helper
132133
# 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
135135

136136
# Yield the installed version, if it matches, unless the user
137137
# specified `--force-reinstall`, when we want the version from
@@ -149,7 +149,7 @@ def iter_found_candidates(self, ireq, extras):
149149
extras=extras,
150150
parent=ireq,
151151
)
152-
version_candidates[installed_version] = candidate
152+
candidates[installed_version] = candidate
153153

154154
found = self.finder.find_best_candidate(
155155
project_name=ireq.req.name,
@@ -166,9 +166,9 @@ def iter_found_candidates(self, ireq, extras):
166166
name=name,
167167
version=ican.version,
168168
)
169-
version_candidates[ican.version] = candidate
169+
candidates[ican.version] = candidate
170170

171-
return six.itervalues(version_candidates)
171+
return six.itervalues(candidates)
172172

173173
def make_requirement_from_install_req(self, ireq):
174174
# type: (InstallRequirement) -> Requirement

0 commit comments

Comments
 (0)