Skip to content

Commit ee995ad

Browse files
committed
clean up unused variables
1 parent 6e98362 commit ee995ad

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

python/private/pypi/parse_requirements.bzl

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,14 @@ def parse_requirements(
219219

220220
if sdist:
221221
sha = sdist.sha256
222-
if sha not in sdists_by_sha:
223-
sdists_by_sha[sha] = struct(
224-
distribution = r.distribution,
225-
srcs = r.srcs,
226-
extra_pip_args = r.extra_pip_args,
227-
sdist = sdist,
228-
platforms = [],
229-
)
230-
sdists_by_sha[sha].platforms.extend(target_platforms)
222+
sdist_info = sdists_by_sha.setdefault(sha, struct(
223+
distribution = r.distribution,
224+
srcs = r.srcs,
225+
extra_pip_args = r.extra_pip_args,
226+
sdist = sdist,
227+
platforms = [],
228+
))
229+
sdist_info.platforms.extend(target_platforms)
231230

232231
if len(whls) == 0:
233232
continue
@@ -244,7 +243,7 @@ def parse_requirements(
244243
),
245244
)
246245

247-
for sha, sdist_info in sdists_by_sha.items():
246+
for sdist_info in sdists_by_sha.values():
248247
ret_requirements.append(
249248
struct(
250249
distribution = sdist_info.distribution,

0 commit comments

Comments
 (0)